Archived topic
Disable mobile Navigation
15 replies · Started by Johannes on December 8, 2016
Hi, I am not able to disable the Primary navigation ( I try to do it from the edit page - disable elements ) from showing up in mobile view.
regards
Johannes
Interesting, you're correct - this is an issue.
On that page, you can do this:
@media (max-width: 768px) {
.menu-toggle {
display: none;
}
}
I'll get this added into the next version :)
Thank you.
I can not make this happen.
The code you give me should do this on all pages?
If page id is 4, how does CSS code look like then ?
regards
Johannes
You can install Tom's Simple CSS plugin and add the code on that particular page
https://generatepress.com/knowledgebase/adding-css/
Alternatively, you can do this:
@media (max-width: 768px) {
.page-id-4 .menu-toggle {
display: none;
}
}
Hi, as I mentioned this code does not do the trick. The mobile version of the primary menu still appears when visiting the page from mobile or other small screens.
@media (max-width: 768px) {
.menu-toggle {
display: none;
}
}
regards
Johannes
Sorry but have you tried putting the code in simple css? If it still doesn't work, would you mind sharing your site link?
Hi Jamal,
Here it is: http://www.allnor.no/bbtest/
On this page both Primary and Secondary navigation is disabled in admin. It work ok on wide window browsers but on small browser windows the Primary navigation occurs. And yes the code is added in simple CSS.
This website is only for testing purposes.
regards
Johannes
Ah, you're using the mobile header.
In that CSS, replace .menu-toggle with .mobile-header-navigation.
Hi, I had to add the !important code. now it works ok.
When will this bug be fixed?
regards
Johannes
In GP Premium 1.2.93 :)
Hey Tom,
I haven't been able to disable mobile navigation on my site using both the .menu-toggle and .mobile-header-navigation. I have been putting it in the Additional CSS area in the Wordpress Customizer. Should I be putting it somewhere else? My website is htt://www.narra.life/homev3
Thanks!
Are you wanting the "Login" link to still display?
Actually I was looking to disable the navigation entirely, so both the logo and the Login... and the toggle. At the very least, I need the logo removed. It is too big on mobile.
Ah, that's much easier.
This should do it:
@media (max-width: 768px) {
.main-navigation {
display: none;
}
}
Wow that was quick, you rock!