- This topic has 3 replies, 2 voices, and was last updated 6 years, 3 months ago by Leo.
-
AuthorPosts
-
December 26, 2017 at 10:45 am #457309Rob
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!
December 26, 2017 at 11:51 am #457346LeoStaffCustomer SupportHi 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?
December 26, 2017 at 12:02 pm #457352RobThat 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.
December 26, 2017 at 6:53 pm #457487LeoStaffCustomer SupportOk 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; } }
-
AuthorPosts
- You must be logged in to reply to this topic.