Im listing all wordpress posts in the blog category but trying to add a class called 'last' to every third 'fourcol' class
<strong>HTML</strong>
Hope this makes sense?
<strong>HTML</strong>
Code:
<div class="container">
<div class="row">
<?php query_posts('category_name=blog&showposts=10&orderby=date&order=dsc'); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="fourcol">
<a href=""><h2 class="blogtitle"><?php the_title(); ?></h2></a>
<a href="#"><img src="images/_scroll1.jpg"></a>
<span class="date">12 May 2011</span>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
<a class="more" href="#">Keep reading</a>
</div><!-- fourcol END -->
<?php endwhile; endif; ?>
</div><!-- row END -->
</div><!-- container END -->
Hope this makes sense?