Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // search filter
- function fb_search_filter($query) {
- if ( !$query->is_admin && $query->is_search) {
- $query->set('post_type', array('post', 'page', 'tribe_events', 'tribe_organizer') ); // id of page or post
- /*
- $today = date("Y-m-d");
- $meta_query = array(
- array(
- 'key' => '_EventStartDate',
- 'value' => $today,
- 'compare' => '>'
- )
- );
- $query->set( 'meta_query', $meta_query );
- */
- }
- return $query;
- }
- //The code above displays blog posts, pages, all events, and organizers.
- //If I uncomment the other code, it displays upcoming events, but not blog posts, pages or organizers.
Add Comment
Please, Sign In to add comment