Event-listing: Search box (interface) with multiple select-options for categories, staff, and more ..
I didn’t catch this: does such a search interface exist? I found the only one is via shortcode:
[EVENT_LIST category_identifier=your_category_identifier],
with concateneted identifiers possible.
However, this is not handy for the user-interface.
Another very tiny solution would be [EVENT_SEARCH] – shortcode. Even this does not meet the needs described above.
Do you have a suggestion how to realize a qualified search by event-properties.
We don’t have a built in method to search by specific parameters. This may come eventually — maybe around 3.4 or so, when we start pulling in custom post type functionality — but, barring building your own SQL search function, there isn’t a way to do it other than the [EVENT_SEARCH] shortcode.
This is my sql-query, added as a separate function in event-list.php:
// search for categories, having events
$sql = “SELECT DISTINCT c.id, c.category_name, c.category_identifier FROM “.EVENTS_CATEGORY_TABLE.” c “;
$sql .= “JOIN “.EVENTS_CATEGORY_REL_TABLE.” r ON c.id = r.cat_id “;
$sql .= “JOIN “.EVENTS_DETAIL_TABLE.” e ON r.event_id = e.id “;
$sql .= “WHERE is_active = ‘Y’ “;
$sql .= $show_expired == ‘false’ ? ” AND (e.start_date >= ‘” . date(‘Y-m-d’) . “‘ OR e.event_status = ‘O’ OR e.registration_end >= ‘” . date(‘Y-m-d’) . “‘) ” : ”;
$sql .= $show_secondary == ‘false’ ? ” AND e.event_status != ‘S’ ” : ”;
$sql .= $show_deleted == ‘false’ ? ” AND e.event_status != ‘D’ ” : ” AND e.event_status = ‘D’ “;
$categories = $wpdb->get_results( $sql );
—
Furthermore I use category-identifier field to introduce a certain category-structure using category groups, like ‘groupName-ID’.
Showing multiple category-checkboxes, grouped (by groupName, see above), and carriing out a small JS-function which builds a custom category-identifier-string, I am able to filter events with checked categories out, using shortcode [EVENT-LIST category_idendifier=my-custom-category-identifier-string].
The support post ‘Event-listing: Search box with multiple select-options for categories, staff ..’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.