Archived topic
Removing main menu
5 replies · Started by Fernando on January 22, 2018
Dear support
Would you tell me how to remove the nav main menu from my site since I'll add it using Elementor template?
I've add to wp_head hook the next code but does not work:
<?php
add_filter( 'nav-below-header', 'disable_header' );
function disable_header()
{
return '';
}
?>
Worth mention that I've also set Primary Navigation as below the header.
Thanks
Sorry, I found out it. The correct hook is:
<?php
add_filter( 'generate_navigation_location', 'disable_header' );
function disable_header()
{
return '';
}
?>
Thanks anyway :)
Regards
You can also go to Customize > Layout > Primary Navigation and set the location to Hide :)
That's why we say GP is a very versatile product. ;)
I've just tried to hide the menu by setting it to Hide - but it still shows up in tablet and mobile?
Hi there,
if you are using the Mobile Header then currently you would need some CSS or disable the Site Header on that page.
Is there a specific instance where you want to hide the menu?