Home › Forums › Support › Change header background for category or pages › Reply To: Change header background for category or pages
May 13, 2015 at 7:38 am
#107675
Tom
Lead Developer
Lead Developer
WordPress doesn’t add the category class to the single posts (for some reason).
You can manually add the classes to your single posts using a function like this: https://wordpress.org/support/topic/modify-body_class-output-to-show-category-slug-for-single-posts?replies=11#post-1396482
As for pages, it’s very similar to the above:
body.page-id-xx {
background-image: url('');
}