Hide Menu Search When Using Custom Menus
// Disables the search in the menu when a custom menu is being used on the page
function myprefix_menu_search_display() {
if ( get_post_meta( get_the_ID(), 'wpex_custom_menu', true ) ) {
return false;
} else {
return true;
}
}
add_filter( 'wpex_has_menu_search', 'myprefix_menu_search_display' );
All PHP snippets should be added via child theme's functions.php file or via a plugin (we recommend Code Snippets)