Take the 2-minute tour ×

I'd like to make my most recent article display a large with a larger thumbnail and with more content, while the rest of the posts in the loop show a small thumbnail and only the title with no content.

Is there a way I can do this in one while(have_posts()) loop?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

check the built in counter $wp_query->current_post within the loop:

while( have_posts() ) :

    if( 0 == $wp_query->current_post ):
        // this is the first post in the loop, output larger size, full content, etc.
        // output regular size, the_excerpt, etc.

share|improve this answer

I'm no wordpress expert but could you use 2 loops one showing the latest post and one showing posts after in order to have the different CSS?

So loop for most recent ...

       while ($my_query->have_posts()) : $my_query->the_post(); ...

And the second loop (offsets the posts by 1)

    <?php $offset = new WP_Query('offset=1&showposts=5');
    while ($offset ->have_posts()) : $offset->the_post()...

You can change showposts=5 to show the number of posts you want in the remaining loop.

share|improve this answer

Your Answer


