Forums › Forums › Search & Filter Pro › Filter by _EventStartDate with The Events Calendar PRO by Modern Tribe
Tagged: date, The Events Calendar, tribe events, V3
- This topic has 7 replies, 2 voices, and was last updated 1 year, 10 months ago by Trevor.
-
Anonymous(Private) February 18, 2019 at 3:44 pm #202606
I created a filter for events and added in the Search Form UI a post-meta field using Date and _EventStartDate custom field as target. I tried different options but whenever I use this field in the frontend is not showing any results, with or without data range.
The strange thing is that the settings to show only present and future events works perfectly putting _EventEndDate : date : >= Current date.
I wait until cache is built and shows events, but when I filter I get nothing.
Anonymous(Private) February 22, 2019 at 9:50 am #202989Dates are stored in this format: YYYY-MM-DD HH:MM:SS
But the global filter to show only content from the current date to the future works perfectly.Is there a way I can make it work? Maybe modifying the code of the plugin manually?
Thanks for your help!
Trevor(Private) February 22, 2019 at 12:14 pm #203006The only way you could make it work is to have a second date field, that holds the date in our required format. You could add a function to your child theme’s functions.php file to hook in to the WordPress save_post() function to process the saved date and save it in the desired format into this new field.
Anonymous(Private) February 22, 2019 at 2:47 pm #203056Seems not very efficient to duplicate meta fields just to do this.
There is an option for Date Input Format: Timestamp or YYYYMMDD (ACF). Could you make a new one for
The Events Calendar plugin, so they are compatible? This is by far the top 1 calendar plugin:
https://wordpress.org/plugins/tags/calendar/ -
AuthorPosts