help with categories
-
I want to write a function where I can pass in a parent category’s slug or id, which then checks whether or not the current post is in any of the parent category’s child categories, and if it is, it should return a list of all the child categories that the post is in.
I tried the ‘in_category’ and ‘post_is_in_descendant_category’ functions, but they only return true or false whether or not the post is in any child categories, they dont tell me specifically WHICH child categories the post is in.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘help with categories’ is closed to new replies.