Using is_category and in_category together
-
I am trying to show category-specific banners. I want a category’s banner to show up whether you’re on a category archive OR on a post within a category. I am having trouble constructing the IF statement. It is outside the loop, in the header code.
I thought I could use:
<?php if (is_category('city')) || in_category('city')) : ?>
But only the first part of that statement has any effect.Any ideas?
Thanks.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Using is_category and in_category together’ is closed to new replies.