Hi,
We have multiple dates for most events.
Is it possible to display an event list that shows all events that has upcoming dates, first (sorted by nearest first) and after that show all events that doesn´t have any upcoming events anymore?
I have been trying all kinds of things but can´t find a good solutions
… I was hoping something like this would work “ORDER BY (CASE WHEN DATE(StartDate) < DATE(CURDATE()) THEN 1 ELSE 0 END) DESC, StartDate ASC” …in a posts_orderby -filter.
but I fear I´m completely stuck now
Event list should be “series” (I´m using eo_get_the_occurrences_of() to display all dates for each “event spot”)
Thanks!
AK
Hi,
I think a better option might be to use different shortcodes? One for future events, and one for past events.
Future events:
[eo_events event_end_after="today" group_events_by="series"]
Past events:
[eo_events event_end_before="today" group_events_by="series"]
But I think you might end up with events in both shortcodes if they have past and future occurrences.
What you could do is use eo_interval="expired"
to get only events with no future occurrences:
[eo_events group_events_by="series" eo_interval="expired"]
Stephen Harris
Thank you Stephen,
That “expired” arg is really useful, I didn´t know it existed
Thanks!
AK