On category archives I want to use different sidebars for different main categories.
So I want to ask the database if the current category archive is a sub-category of the main category with the ID=14.
I found this code
<?php if (cat_is_ancestor_of( 14 , $current )); ?>
But it doesn’t work. Because I don’t understand how to get the $current variable.
plz, more help appreciated,
- The topic ‘conditional tag to find out if the category archive is a child of …’ is closed to new replies.