skip to Main Content

Conditionally Select Mobile Menu Style

/**
 * Example function to change the mobile menu style
 * Available styles: full_screen, sidr, toggle, disabled
 *
 * @see framework/classes/global-object.php
 */
function myprefix_change_mobile_menu_style( $style ) {

	// Disable mobile menu on homepage
	if ( is_front_page() ) {
		$style = 'disabled';
	}

	// Return style
	return $style;
}
add_filter( 'wpex_mobile_menu_style', 'myprefix_change_mobile_menu_style' );
All PHP snippets should be added via child theme's functions.php file or via a plugin (we recommend Code Snippets)
Back To Top