Forums › Forums › Search & Filter Pro › Filter Events Occuring on Specific Date or in Range
- This topic has 1 reply, 2 voices, and was last updated 10 years, 7 months ago by
Ross.
-
Anonymous(Private) September 27, 2015 at 1:08 pm #25968
Hello,
I’m using search and filter pro with Easy Digital Downloads for events where each event has a custom field for start date and another for end date.
I’d like users to be able to filter the events happening on a specific day they select or between a date range. Currently, If I create a meta post filter for “start date” and they select a date using the date picker, they will only see the events with a start date = the selected date. However, the event might have started prior to the selected date and is still ongoing on the day they selected (like an art gallery open for weeks) and it will not show in the result.The queries should be like this when they select a date (I’m referring to event start and end dates below):
$qry .= ” AND ( p.ID in (select pm.post_id from $wpdb->postmeta pm where pm.meta_key=’start_date’ and (pm.meta_value <= ‘”.$_REQUEST[‘selected_date’].”‘ )))
$qry .= ” AND ( p.ID in (select pm.post_id from $wpdb->postmeta pm where pm.meta_key=’end_date’ and (pm.meta_value >= ‘”.$_REQUEST[‘selected_date’].”‘ )))The same logic would apply to finding events occurring between a selected date range.
Is there any way to achieve this using search and filter pro? I have version 2.0.1
I really need this functionality urgently to launch my website and I’d hate to let go of search and filter pro because of this as I’m using it for categories and search many other fields as well.
Please help!
ZeinaRoss Moderator(Private) September 28, 2015 at 11:22 am #26019Hey Zeina
This is not possible with the current version – however I’m looking to add it to 2.1.
Thanks
-
AuthorPosts