skip to Main Content

Snippet: Conditionally Select Mobile Menu Style

 * Example function to change the mobile menu style
 * Available styles: full_screen, sidr, toggle, disabled
add_filter( 'totaltheme/mobile/menu/style', function( $style ) {

	// Set the mobile menu style to "full_screen" on the homepage only.
	if ( is_front_page() ) {
		$style = 'full_screen';

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