Displaying a different look for a post dependent on Category
-
I like the category of each post to define how that post looks. A good example of this is on the ThinkProgress blog: http://thinkprogress.org/
I’ve tried a couple things, such as:
<?php if (is_category(‘postrock’)) { ?>
html to display
<? } else { ?>
html to display
<? } ?>But that doesn’t work. I assume because is_category is for IF we’re on the category page for postrock, then display this.. not IF the category assigned to this post is post-rock, then display this.
I’ve also tried:
<?php if the_category() == postrock ?>
But that only prints the category name.
Any help is MAJORLY appreciated!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Displaying a different look for a post dependent on Category’ is closed to new replies.