Reply To: Change Colours per page basis

Home Forums Support Change Colours per page basis Reply To: Change Colours per page basis

Home Forums Support Change Colours per page basis Reply To: Change Colours per page basis

#85167
Tom
Lead Developer
Lead Developer

Hi Craig,

To display different header images on different pages, you would have to remove your logo from the Header Content area, and re-add it using GP Hooks and some if conditionals. More info here: http://generatepress.com/forums/topic/individual-header-image/#post-51223

You can also target CSS on individual pages by using the page ID of each individual post.

Using Chrome, right click on the page and click “Inspect Element”.

In the <body> element, you’ll see a class like this: page-id-2

“2” being the ID of the page – this will change depending on the page.

Using that class, we can target any element in the theme for that specific page.

For example, to change the site header background color on a specific page with the ID “2”, we could do this:

.page-id-2 .site-header {
      background: #000;
}

Hope this helps 🙂