I have an instance where I need to have a widget display only on the child pages of a category. I’m using the suggested conditional code but I suspect the problem is that the page is being called using the slug. If it’s not that, then I don’t know what the problem is.
The conditional code I’m using:
is_category() && in_array($cat, get_term_children( 13, 'category'))
The actual page URL displayed when I go to the page is:
Any idea why it isn’t working?
- The topic ‘Show on child category page using slug?’ is closed to new replies.