Archived topic
Is there a way to make the header a different color on different pages?
7 replies · Started by Perrin on August 29, 2018
For example, I'd like it to be one color on the homepage and another color on interior pages. Any way to do that?
Thanks!
Hi there,
Any chance you can link us to the site in question?
You can edit the original topic and use the private URL field.
Let me know :)
Done (although there are no inner pages yet).
If you use Tom's Simple CSS plugin, it gives you a CSS metabox for each page, then you can use the CSS here to change the color of the header:
.site-header {
background-color: #fff;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know :)
Yep; but won't that change the color site wide? I'd like to change it on the header only :/
If you use Tom’s Simple CSS plugin, it gives you a CSS metabox for each page. The CSS added in there will only apply to that page.
Alternatively, you can add a page ID class to it targets the specific page:
.page-id-xx .site-header {
background-color: #fff;
}
THANK YOU. This should be it :)
No problem :)