Same style for a parent category and it’s child, but different for the rest?
-
Hi, I’m really new with PHP so I don’t know how to go about doing this.
What I want to do:
I have 2 main categories, (1)Prose and (2) Poetry. And each have their own sub categories.I want to style the 2 main categories differently, and their sub categories following suit of their own parents. And the styling can be done by calling a new css OR just change the defining div id.
(e.g. from
<div id="cat-prose"> to <div id="cat-poetry">
or something like that)
The sub-categories will be added in due time, so I don’t want to painstakingly add more category-#.php into the theme. Is there a way to do this with just one category.php file and only do queries?
I’ve seen a lot of support questions tackling different styles/ themes for different categories. But I couldn’t find the one I need. Any help will be much appreciated.
Thank you very much
- The topic ‘Same style for a parent category and it’s child, but different for the rest?’ is closed to new replies.