Skip to content

Snippet: Exclude Events From Search Results

function my_tribe_events_register_event_type_args( $args ) {

    // Exclude from search
    $args['exclude_from_search'] = true;

    // Return args
    return $args;

}
add_filter( 'tribe_events_register_event_type_args', 'my_tribe_events_register_event_type_args' );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top