Hi, will you please share your site URL so that I can tell you exactly how to do it?
Add this code in the function.php file.
function alternatepost_post_class ( $classes ) {
global $current_class;
$classes[] = $current_class;
$current_class = ($current_class == 'odd') ? 'even' : 'odd';
return $classes;
}
add_filter ( 'post_class' , 'alternatepost_post_class' );
global $current_class;
$current_class = 'odd';
Now add color using the CSS –
.even {
background:#a600f9;
}
.odd {
background:#25ddc2;
}
Hope it will help you to resolve your query.
Figured it out. Sharing.
.grid-entry:nth-child(odd)
Thanks for getting back to me. I didn’t see your replies before I posted again. You went to so much trouble. It is greatly appreciated. The css snippet I posted seems to work. The site I’m working on isn’t open yet.