Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $category=get_the_category();
- $parent_id = $category[0]->cat_ID;
- foreach($category as $childcat)
- {
- if (cat_is_ancestor_of($parent_id, $childcat))
- {
- echo $childcat->cat_name;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement