I have this code so far, which adds the classes first, second, and third to every first, second and third post in the loop. It also adds a class to the first 3 posts in the loop. But how can I make it so that it adds another class to the final 3 posts?
if (have_posts()) :
while (have_posts()) :
the_post();
$classes = array('themeview');
$classes[] = $style_classes[$counter % 3];
if ($counter < 3) $classes[] = 'top';
$class = sprintf('class="%s"', implode(' ', $classes));
$counter++
?>
<li <?php echo $class?>>
Thanks!