I’ve done some fancy things with [p] styles for entries.
it’s a css trick, not a WP mod or plugin.
maybe?
From the codex loop page: http://codex.wordpress.org/The_Loop
<?php if ( in_category('3') ) { ?>
<div class="post-cat-three">
<?php } else { ?>
<div class="post">
<?php } ?>
I am guessing you could extrapolate this:
<?php if ( in_category('3') ) { ?>
<div class="post-cat-three">
<?php elseif ( in_category('4') ) { ?>
<div class="post-cat-four">
<?php elseif ( in_category('n') ) { ?>
<div class="post-cat-n">
<?php } else { ?>
<div class="post">
<?php } ?>
I am guessing with the elseifs, but the logic seems sound enough. Someone might know the right syntax.
Does anyone know why this gives a parse error? It looks fine to me.
A couple of }
‘s are missing.
an alternative, less error-prone way is the fortran-style:
<?php if ( in_category('3') ) : ?>
<div class="post-cat-three">
<?php elseif ( in_category('4') ) : ?>
<div class="post-cat-four">
<?php elseif ( in_category('n') ) : ?>
<div class="post-cat-n">
<?php else : ?>
<div class="post">
<?php endif; ?>