[Resolved] disable mobile menu for primary menu only

Home Forums Support [Resolved] disable mobile menu for primary menu only

Home Forums Support disable mobile menu for primary menu only

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #755759
    drew

    I found the great snippet at https://generatepress.com/forums/topic/possible-to-not-turn-nav-bar-into-a-button-on-mobile/#post-120858 for deactivating mobile menus but is there a way to only have this apply to the primary menu only?

    #755896
    Tom
    Lead Developer
    Lead Developer

    That code is pretty old.

    Are you wanting your primary navigation to display fully on mobile instead of the toggle?

    #755898
    drew

    Correct, it only has one menu item so it’s fairly redundant to make a user select it then select the very same item again in the slideout ๐Ÿ™‚

    #756064
    Tom
    Lead Developer
    Lead Developer

    Give this CSS a shot:

    @media (max-width: 768px) {
        .main-navigation button.menu-toggle,
        .main-navigation .mobile-bar-items {
            display: none;
        }
    
        .main-navigation ul {
            display: block;
        }
    }
    #756099
    drew

    That does the trick, many thanks!

    #756134
    Tom
    Lead Developer
    Lead Developer

    You’re welcome ๐Ÿ™‚

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