Forums › Forums › Search & Filter Pro › Filtering Upcoming Events
Tagged: V3
- This topic has 3 replies, 2 voices, and was last updated 4 years ago by Trevor.
-
Anonymous(Private) November 2, 2020 at 4:09 pm #264942
I’m having some trouble creating a search filter. I would like to have radio buttons for UPCOMING and PAST event, defaulting to UPCOMING.
If UPCOMING is selected, I need to show only where an ACF date field is >= today. Sorted by that date ASC.
If PAST is selected, I need to show only where an ACF date field is < today. Sorted by that date DESC.
I’m using Beaver Builder, and I’d already created this function that filters the post list by those parameters, using an ID for the module:
But I don’t think that will work with S&F, because the content source for the module needs to be Search and Filter, rather than Custom Query.
So in S&F, I’ve set the default order to a Meta Value of event_start_date ASC, which does the same thing, but of course, includes all events.
Is there a way to set a radio filter to default to event_date_date ASC (only show where that date field is >= today?
Then if that filter is switched to PAST, reverse that filter and show past events DESC?
-
AuthorPosts