Full-page backgrounds for different categories
-
PRECURSOR: I am not skilled with web-design, please make instructions clear and accurate. Thanks! Also, please view the blog in question!
I had, quite literally, everything working fine! When I went onto the category Generation 1 and all posts under that category, it had the different background.
Then I added a background for the whole site and now? It doesn’t work and it’s the same background on everything.
I used this on the style.css:
body.category-generation1 { background:url(10.jpg) }And extended body_class (or however it’s put) in header.php to say this:
<body <?php if(is_single()) { $post_cats = get_the_category($post->ID); foreach($post_cats as $cat) { $cat_class[] = 'category-'.$cat->slug; };}; body_class($cat_class); ?>>If anyone decides to help me: THANK YOU, and please be clear so I don’t need to come back and ask for clarification and annoy you! 🙂
The topic ‘Full-page backgrounds for different categories’ is closed to new replies.