[Resolved] Issue disabling header and main menu

Home Forums Support [Resolved] Issue disabling header and main menu

Home Forums Support Issue disabling header and main menu

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #457552
    Fernando

    Dear support
    I am working in a ‘one page’ design and I’ve disabled the menu and header on it. The problem I facing is when I see the page in mobile view, menu and logo show up. Is this a expected behavior? How I can disable them no matter the viewport since I’ll add them using Elementor?
    Looking forward to your comments
    Best regards

    #457942
    Leo
    Staff
    Customer Support

    Hi there,

    Can you link me to the page in question?

    #457961
    Fernando

    This is http://bit.ly/2E3hftA
    Reduce the viewport in order to see header and menu how show up.
    My intention is that they are placed them using Elementor Pro and not with GP
    Thanks

    #457979
    Leo
    Staff
    Customer Support

    So basically you want to remove GP’s navigation by default?

    If try this: https://docs.generatepress.com/article/generate_navigation_location/

    #457990
    Fernando

    yes, I want that but removing the site logo as well and indicating one specific page.
    Is that possible?

    #457997
    Fernando

    BTW, the filter works but it does not when page has a mobile view. I mean, when I see in a desktop view, the menu is gone, but when I reduce the window the menu appears at the top, along with the logo.

    #458157
    Leo
    Staff
    Customer Support

    Can you try disabling the mobile header navigation?
    https://docs.generatepress.com/article/mobile-header/

    #458369
    Fernando

    Yes, that works but I’d like to disable only in this page, not in the whole site.
    Is there any way without appeal to a CSS solution?
    Regards

    #458641
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Give this PHP a try:

    add_filter( 'option_generate_menu_plus_settings', 'tu_disable_mobile_header' );
    function tu_disable_mobile_header( $options ) {
        if ( is_front_page() ) {
            $options['mobile_header'] = 'disable';
        }
    
        return $options;
    }
    #459459
    Fernando

    Hi Tom and Leo. That works!
    Excellent support as always
    Have a excellent happy new year!
    Best regards

    #459548
    Leo
    Staff
    Customer Support

    Glad we could help!

    You as well 🙂

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