[Resolved] Removing main menu

Home Forums Support [Resolved] Removing main menu

Home Forums Support Removing main menu

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #477358
    Fernando

    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

    GeneratePress 2.0.2
    GP Premium 1.5.6
    #477372
    Fernando

    Sorry, I found out it. The correct hook is:

    <?php
    add_filter( 'generate_navigation_location', 'disable_header' );
    function disable_header()
    { 
        return '';
    }
    ?>

    Thanks anyway πŸ™‚
    Regards

    #477404
    Tom
    Lead Developer
    Lead Developer

    You can also go to Customize > Layout > Primary Navigation and set the location to Hide πŸ™‚

    #477426
    Fernando

    That’s why we say GP is a very versatile product. πŸ˜‰

    #787730
    ellegaarddk

    I’ve just tried to hide the menu by setting it to Hide – but it still shows up in tablet and mobile?

    #787951
    David
    Staff
    Customer Support

    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?

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.