skip to Main Content

Move Search Icon to Front/Start of Menu

By default when using certain header styles (header style one, two, three, four, five and six) the search icon is placed at the very end of the menu but it's possible to place the search icon at the start of the menu using a little custom code.

/**
 * Alter the header menu search icon position.
 *
 * @link https://total.wpexplorer.com/docs/snippets/header-menu-search-position/
 * @param $position string | Accepts start or end.
 */
add_filter( 'wpex_header_menu_search_position', function( $position ) {
	$position = 'start';
	return $position;
} );
All PHP snippets should be added via child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)
Back To Top