conditional includes within the post loop for dif categories of post?
-
I am playing with a theme and would like each post to contain an icon related to the category the post has been made within. i am sure it’s doable using conditional includes, yet i’m not sure which tags should be used withint he post to make this happen. here’s a snippet of code i tried. obviously it doesn’t work, does anyone have a suggestion?
<?php if (is_category('random')) : ?> <img class="category" src="<?php bloginfo('template_directory'); ?>/images/random.jpg" /> <?php endif; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘conditional includes within the post loop for dif categories of post?’ is closed to new replies.