Problem using in_category in single.php
-
Hi there,
I would like to use a template for all the posts in one of my categories. I have included the following in my single.php page before the loop. However it passes everything as true and therefore sends all the posts to the include regardless if it’s a post within the category 22 or not. Can you help?
<?php if (in_category('22')) { ?> <?php include(TEMPLATEPATH . '/includes/guided-tour.php'); ?> <?php } else { ?>
Thanks Jono
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Problem using in_category in single.php’ is closed to new replies.