cliffordp
6/21/2018 - 9:27 PM

The Events Calendar: Remove the "Search" / "Keyword" field from the Tribe Bar.

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 );
} );