Conditional if is subcategory of x category?
-
Searched way too long today, I give up. I am trying to find a way to detect a category and it’s subcategories, something like the following:
if ( is_category( array( 'news','whatever', 'something else' ) ) || is_subcategory('news', 'another cat', 'etc') )
I’m trying to show specific content for categories and their subcategories, on the category.php template.
I know there is no such thing as is_subcategory, but there certainly should be. Anyone know of a trick to make this work?
Thanks~!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Conditional if is subcategory of x category?’ is closed to new replies.