Snippets: Disable the header style one megamenu full-width script

When using header sytle one by default the theme adds javascript so that your megamenu expands full-width so it's always the width of your header. However, you can easily disable that via the code below added to your child theme's functions.php file. While you can use CSS for this, actually disabling the javascript is more efficient.

add_filter( 'wpex_localize_array', function( $array ) {
	$array['megaMenuJS'] = false;
	return $array;
} );

Snippet Type: PHP

Posted Under: Menu

All PHP snippets should be added via a child theme's functions.php file.