If In Subcategory
-
Hey There,
I am trying to fins a solution which checks if a post is in a category or a child of it.
Basically, I want to display some text using a command which does something like ‘If this post is in $ category, or is in a child of it, do this’.
I know how to use
if(in_category('2') {
to see if the post is in a certain category, but am unsure of how to do this so it includes children aswell.Any help would be most appreciated.
Many Thanks in Advance,
Oliver Beattie
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘If In Subcategory’ is closed to new replies.