Set different background images for different category posts(not archive pages)
-
Greetings to all members, I have been trying to get a fix around this issue and certainly could not find any so have decided to post the detailed issue on the forum.
ISSUE: I want to have different background images loaded with different categories and their posts included. For example: Category 1 has “A” background image so this image should also be the background image for all the posts in category 1
What I could do until now : using the “Body_class()” in the header and the following code in css, I am able to manage and change background images for the post archives page of the following categories, but the background goes blank as I get into the categories posts.
Example of the CSS code used :
body.home { background-image: url('images/braincloseup4.jpg'); } body.category-robot{ background-image: url('images/oldpaper2.jpg'); } body.category-space{ background-image: url('images/oldpaper3.jpg'); } body.category-brain{ background-image: url('images/braincloseup4.jpg'); }
Any help on this issue would certainly be appreciated.
Thanks
- The topic ‘Set different background images for different category posts(not archive pages)’ is closed to new replies.