is_category OR in_category condition
-
I’m trying to make a condition that creates sidebar content if a specific category archive is being viewed OR if a post in that category is being viewed.
I was thinking this would work but it’s not:
<?php
$post = $wp_query->post;
if ( in_category(19) || is_category(19) ) : ?>DO SOME STUFF
<?php endif; ?>
Any suggestions?
Thanks,
Sean
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘is_category OR in_category condition’ is closed to new replies.