Instantly share code, notes, and snippets.

Embed
What would you like to do?
The Events Calendar: Remove the "Search" / "Keyword" field from the Tribe Bar.
<?php
/**
* The Events Calendar: Remove the "Search" / "Keyword" field from the Tribe Bar.
*
* @link https://gist.github.com/cliffordp/797ee70c0978850e01bdbe0a9efdeef3 This snippet.
* @link https://cl.ly/1i3B1X373s1T Screenshot before.
* @link https://cl.ly/3d0K2C2A2t2U Screenshot after.
*
* @see tribe_events_get_filters
*/
add_action( 'tribe_pre_get_template_part_modules/bar', function () {
$tec_main = Tribe__Events__Main::instance();
remove_filter( 'tribe-events-bar-filters', array( $tec_main, 'setup_keyword_search_in_bar' ), 1, 1 );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment