Archived topic
disable mobile menu for primary menu only
5 replies · Started by Drew on December 13, 2018
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?
That code is pretty old.
Are you wanting your primary navigation to display fully on mobile instead of the toggle?
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 :)
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;
}
}
That does the trick, many thanks!
You're welcome :)