conditional tag to find out if the category archive is a child of …
-
Hello!
Another problem:
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,
thx, piedro
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘conditional tag to find out if the category archive is a child of …’ is closed to new replies.