Site logo

[Resolved] Mobile Menu Location

Home Forums Support [Resolved] Mobile Menu Location

Home Forums Support Mobile Menu Location

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #349037
    Daniel

    Currently we have menu locations for slideout menu and primary.
    However, I want to have sub menus only showing on mobile only.
    can we not have a location added for a mobile only menu?
    Or am I missing something?

    #349042
    Leo
    Staff
    Customer Support

    Hi there,

    So you are wanting to hide the submenu items in the slideout menu on desktop?

    If so try adding hide-on-desktop in the Custom Classes field of those sub menu items: https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#custom-classes

    Let me know if this is what you are looking for.

    #349048
    Daniel

    Ok, that worked, but how do I get rid of the dropdown arrow too?

    Thanks in advance 🙂

    #349099
    Leo
    Staff
    Customer Support

    Try this:

    @media (max-width: 768px) {
        .menu-item-has-children .dropdown-menu-toggle {
            display: none;
        }
    
        .main-navigation .main-nav ul li.menu-item-has-children > a {
            padding-right: 20px;
        }
    }
    #349100
    Daniel

    Perfect! I wanted to hide it on desktop.

    Ok, last thing, for the mobile menu, is there anyway to have all the menu items expanded by default without having to click the burger menu.
    I would like to remove the burger menu all together and just have all my mobile menu items (including sub items visible by default), can this be done?

    Leo, thanks for the help by the way.

    Saved me a lot of head scratching 🙂

    #349226
    Tom
    Lead Developer
    Lead Developer

    Something like this maybe?:

    @media (max-width:768px) {
        .menu-toggle {
            display: none !important;
        }
    
        .main-navigation .main-nav > ul {
            display: block !important;
        }
    }
    #358266
    Jay

    Can that be done with the secondary navigation? What would be the code for that?


    @media
    (max-width:768px) {
    .menu-toggle {
    display: none !important;
    }

    .main-navigation .main-nav > ul {
    display: block !important;
    }
    }

    #358366
    Leo
    Staff
    Customer Support

    Give this a shot:

    @media (max-width:768px) {
        .menu-toggle.secondary-menu-toggle {
            display: none !important;
        }
    
        .secondary-navigation .main-nav > ul {
            display: block !important;
        }
    }
    #358823
    Jay

    That worked! Thanks Leo

    #358830
    Leo
    Staff
    Customer Support

    No problem!

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