If article is in parent category
-
Hi.
I’m trying to change my template for child categories by defining parent category.
I’ve tried this :
<?php $category = get_the_category(); if ($category->category_parent == 5) : ?> my template <?php endif ; ?>
But it doesn’t seem to work.
Any ides please?
thank in advance.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘If article is in parent category’ is closed to new replies.