WP_Query to filter events by venue city
-
Hi,
I follow this post to add a ‘venue city’ filter to the events bar of The Events Calendar.
However, the docs end at the interesting part. It says
add_filter( 'tribe_events_pre_get_posts', 'setup_my_bar_field_in_query', 10, 1 );
function setup_my_bar_field_in_query( $query ){
if ( !empty( $_REQUEST['tribe-bar-my-field'] ) ) {
// do stuff
}
return $query;
}
Well, I’m looking for the
// do stuff
part to enable users to filter events by venue’s cities. What would the appropriate$args
array need to look like that needs to be added to the WP_QUERY object via ‘tribe_events_pre_get_posts’ filter?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘WP_Query to filter events by venue city’ is closed to new replies.