You can edit index.php
<?php // Post Container starts here
if ( function_exists('post_class') ) { ?>
<div <?php if ( is_page() ) { post_class('post'); } else { post_class(); } ?> id="post-<?php the_ID(); ?>">
<?php } else { ?>
<div class="<?php echo ( is_page() ? 'page ' : '' ) . 'post" id="post-'; the_ID(); ?>">
<?php } ?>
Change to
<?php // Odd or even
$odd_or_even = (($postcount % 2) ? 'odd-post' : 'even-post' ); ?>
<?php // Post Container starts here
if ( function_exists('post_class') ) { ?>
<div <?php if ( is_page() ) { post_class('post'); } else { post_class("$odd_or_even"); } ?> id="post-<?php the_ID(); ?>">
<?php } else { ?>
<div class="<?php echo ( is_page() ? 'page ' : '' ) . 'post" id="post-'; the_ID(); ?>">
<?php } ?>
I included the code above in 3.3.4
Add a CSS Insert:
div.odd-post {
background: ...
border: ...
}
div.even-post {
background: ...
border: ...
}
|