Hide menus on certain pages
-
I would like to hide the mobile main menu on certain pages on my website and I’m not finding a way to do that. Most of the site is private but there are a few pages that is open.
On the page link above, I had to hide the header because it was showing the mobile links from the member site that is private.
I am using conditional headers on those pages but the mobile version of the of the main menu will show in mobile view. In desktop view only the conditional header shows and not the main header shows.
Screenshot of how the menu looks in mobile. The main menu should not be there in mobile – https://imgur.com/a/YAObwtK
TYIA, Tammy
-
This topic was modified 1 month, 3 weeks ago by
tammya1999.
The page I need help with: [log in to see the link]
-
This topic was modified 1 month, 3 weeks ago by
-
Hello @tammya1999, This usually happens because many WordPress themes load the mobile menu separately from the desktop header. So even if you hide the header conditionally, the mobile off-canvas / hamburger menu is still being output in mobile view.
There are multiple ways to hide the menu from a specific page. But I am sharing the one I use most of the time.
In WordPress, every page has a page ID. To get the exact page ID, edit the page and look at the URL. Now, with the URL, take the menu class and hide it via CSS. Simple display none CSS.
Note: Try this, only if you are expert in the editing WP site.
You must be logged in to reply to this topic.