In my single.php file I would like to have a conditional that checks for the category of the post and display certain images and layout. Here is what I have: http://pastebin.com/dy6TE1yr
1 Answer
Look at http://codex.wordpress.org/Function_Reference/in_category
Example:
<?php if ( in_category('rabbis-weekly-commentary') ) : ?>
<div id="inner_header">
<img src="http://www.ifcj.ca/ifcj_ca/images/elements/commentary_header.gif" border="0">
...
<?php elseif ( in_category('yaels-weekly-commentary') ) : ?>
<div id="inner_header">
<img src="http://www.ifcj.ca/ifcj_ca/images/elements/commentary_header.gif" border="0">