Archived topic
disable mobile menu on one particular page
5 replies · Started by Robin on September 11, 2020
With your generous help, I customized the attachment page, but on mobile that created problems, because there was then a double menu.
I solved that for now by adding custom css:
@media (max-width: 768px) {
.main-navigation .menu-toggle {
display: none !important;
}
}
but of course now on smaller screens, there is no mobile menu at all.
the attachment page has its own element, for all media, and I'm using a child theme so I could customize the attachment page.
How can I solve this?
Hi there,
Can you guide me to a specific page where I can see the issue?
Let me know :)
go to any portfolio page and click the chain link, and then look at that screen at 320 wide
go to any page and look at the screen at 320 wide
it's attachment pages at smallest screen and any other page at smallest screen
all media attachment pages have their own menu, so when they were at the smallest size, there was a double menu, until I added the custom css as above.but adding that custom css means that now NO page has a mobile menu.
Hi there,
try this - it will only disable the Menu toggle on the Attachment pages:
@media (max-width: 768px) {
.attachment .main-navigation .menu-toggle {
display: none !important;
}
}
thank you! that did the trick.
You're welcome