Event Calendar 5.10 and today’s date
-
We have several custom event displays on our website built with the CCS plugin and the Tribe Events Calendar post type, categories, and fields. We are currently running TEC 5.9.1, and I have been testing the 5.10.0 update on our dev site.
When I built these queries initially, the core TEC query was upcoming events and I had to use the display=custom attribute, which had Eliot added specifically for this, to overcome this. This must have changed in 5.10.0, because a list of current exhibitions (page link) that is just filtered with _EventStartDate < today will display EVERY past exhibition with the updates applied.
Most of the changes I have figured out, but I’m stuck on one issue – including the first day of multi-day events in a “current” list. I need the list to go from _EventStartDate is today or before to _EventEndDate is today or after, but events won’t display until AFTER the first day.
The CCS date specs that are working with _EventStartDate and _EventEndDate are future, past, and compare=more (=future) or compare=less (=past) plus value=today. ‘value=today’ without a comparison, or with compare=equal, doesn’t work. More complex date callouts in CCS (eg ‘past and today’) don’t work. So I also can’t pull a display of today’s events only.
I know that ‘today’ is pulling the correct date, I can display it. I know that I am specifying the correct date formatting for TEC (Y-m-d), because this is the format spec that makes ‘future’ and ‘past’ work. In case there is something about the word “today” which conflicts, I set a variable called ‘dayness’ = today’s date and passed that to the query. That generates the correctly formatted date but didn’t work in the query either.
Here’s the basic loop that works great EXCEPT for the missing started today events:
[loop type=tribe_events field=_EventStartDate date_format=’Y-m-d’ value=past field_2=_EventEndDate date_format_2=’Y-m-d’ value_2=future]
[field _EventStartDate date_format=’F j’] – [field _EventEndDate date_format=’F j Y’]: [field title-link]
[/loop]If anyone has any suggestions, please let me know!
The page I need help with: [log in to see the link]
- The topic ‘Event Calendar 5.10 and today’s date’ is closed to new replies.