Date Compare not working
-
I’m using The Events Calendar Plugin (tribe_events) and trying to load more events that match a date query. However, even with a hardcoded date in the
ajax_load_more
shortcode, it’s still returning all events and not just the ones after the date.
Example Shortcode:[ajax_load_more id="alm_4695795696" loading_style="purple" theme_repeater="event-teaser-repeater.php" post_type="tribe_events" posts_per_page="12" offset="12" "meta_key="_EventStartDate" meta_value="2024-04-18" meta_compare="greaterthan" meta_type="DATETIME" order="ASC" orderby="meta_value" sort_key="_EventStartDate" pause="true" images_loaded="true" scroll="false" no_results_text="No more upcoming events"]
You can see in the shortcode that I’m looking for events where the start date is after 2024-04-18.
However, here is an example event that is being displayed: https://tinyurl.com/2628gvgp Which has a start date and end date in February.
Inwp_postmeta
that row shows:
| meta_key | meta_value |
—————————————
_EventEndDate | 2019-02-10 15:00:00
The value there of “2019-02-10 15:00:00” should be less than 2024-04-18 and shouldn’t be displayed, but it is. If also tried using>
instead ofgreaterthan
with no luck.
All other parameters work, such as search and category, when I add those in.
Am I missing something for this date compare?
- The topic ‘Date Compare not working’ is closed to new replies.