Archived topic
Disable menu Background Current colour on the home page
7 replies · Started by Charles on April 9, 2018
Hi Tom,
What's the easiest way to do this? I want a background menu colour on every page except the home page - which I think is a standard practice. Do I have to create a custom template for the home page or is their an easier way to target this?
Thanks
Charles
Hi there,
Can you link me to the site in question?
Just need to see what layout you are using so I can provide the best method.
You can edit the original topic and use the private URL field.
Let me know :)
It's in localhost for development so I can't give you a URL, but here's a jpg of the home page.

I just want to disable the background colour on "Home" but have it appear when you're on all the other pages.
Charles
Hmm background color of what? The body? It looks like it's using a background image?
Background colour of the Home button.
Hmm try this CSS:
.home .main-navigation .main-nav ul li[class*="current-menu-"] > a {
background-color: transparent;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
That does it! Thanks Leo. It might be a good idea to work that into the cusomtizer as an option at some point. Most of the time if you do a menu like that with a Home button, clients don't want it to be highlighted - but they do on every other page.
Charles
We will keep this in mind :)
No problem!