[Support request] Slideout ONLY?

Home Forums Support [Support request] Slideout ONLY?

Home Forums Support Slideout ONLY?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #457309
    Rob

    Hello, I’m confused about the proper use of the slideout menu. The only way the slideout hamburger icon will show on my site is if I set my menu to the “primary menu” location in GP Customizer/WP menu settings. This seems rather useless as the main horizontal menu shows as well as the hamburger/slideout. If I uncheck my menu from “primary menu” and only check the “slideout menu” location, the hamburger icon does not show at all; but curiously my menu still shows to the right of the logo (it seems as though if I uncheck the primary menu location, no menu should appear at all but it does).

    So my question is how do I *only* use the slideout menu as my navigation, and not use the typical horizontal menu to the right of the logo?

    Also, is it possible to use the slideout menu EXCEPT when the sticky menu would appear when scrolling the page? Basically, the reason for this I do not want a menu obstructing the content at the top of my home page. But once the user scrolls, then I’m fine with the sticky menu showing up.

    Thanks!

    #457346
    Leo
    Staff
    Customer Support

    Hi there,

    To use slideout menu on desktop only, you need to create a menu without any items in it and set it to primary navigation.

    Then add your normal menu items in a separate menu and set it to slideout navigation

    https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#setting-a-theme-location

    The other request is a bit tricky…Just to make sure, so you want the menu items to show up once sticky navigation displays? What about the slideout toggle?

    #457352
    Rob

    That worked perfectly (THANKS!) but seems a bit kludgy 🙂 Is this a GP thing that a menu displays even though no menu is selected for primary location?

    Regarding the sticky menu question you had: Yes you’ve got it right. It would be great if on the home page only, the slideout toggle only appears, and when the page is scrolled the sticky menu shows up (without slideout toggle). On other non-home pages, the standard menu shows in the primary location (no slideout). So in that case perhaps your solution above won’t work since a menu will never appear in the primary location. I may have to use CSS to hide the primary location menu (not NOT slideout toggle) on the home page only.

    #457487
    Leo
    Staff
    Customer Support

    Ok a bit complicated but this should work.

    – Add your normal menu items to the primary navigation

    – Add a custom class hide-on-nonstick too the menu items you want to hide on home page non stick navigation:
    https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#custom-classes

    – Then use this CSS:

    @media (min-width:769px) {
        .home .main-navigation.navigation-stick .main-nav ul li.hide-on-nonstick a {
            display: none;
        }
    }
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.