Hello,
I have a custom taxonomy created for events and the event_search doesn’t search that taxonomy when I enter the taxonomy name in the search event field. I think it probably searches just titles or/with content. Is it possible to modify the event_search function to also include searches for that taxonomy? If so, can you navigate me how to do it because I don’t know how to get around that shortcode’s function.
Thank you,
Mark

Marek Zelezny
Hi Marek,
Unfortunately custom taxonomies aren’t supported – though it’s a good idea, so I’ll implement this for 1.11 (I’m afraid it’s too late for 1.10). This will give me a chance to refactor that monster of a file 😉

Stephen Harris
I should add – the search part of the event search does indeed search titles/content (this is standard WordPress behaviour). You could use pre_get_posts
to detect when an event search is being done, then use get_terms()
to search for matching terms, and then modify the tax_query
part of the query. However, I believe that would filter the events, i.e. it would only show events that were in a term LIKE the %search term%. That is WordPress would return “events that have title/content like X and are in term like X”. (If that makes sense…)
Here’s how to catch an event search query
add_filter( 'pre_get_posts', 'my_change_event_search' );
function my_change_event_search( $query ){
if( $query->get( 'context' ) == 'eo-events-search-shortcode' ){
//$query is event search shortcode
}
}

Stephen Harris