I have the code below to list the recent posts on my site. It’s working fine.

I need to style differently the first post (bigger image and bigger title).

Any idea how ?

<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array( 'post_type' => 'post', 'posts_per_page' => 10, 'paged' => $paged );
$wp_query = new WP_Query($args);
while ( have_posts() ) : the_post(); ?>
    <div class="main-content span12">
        <div class="main-content span4">
            <!--Image article-->
            <img src="<?php the_post_thumbnail_url( 'medium' ); ?>">
        </div>
        <div class="main-content span8">
            <!--Titre article-->
            <h4><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h4>
            <!--Extrait article-->
            <?php the_excerpt(__('(more…)')); ?>
        </div>
    </div>
<?php endwhile; ?>

Read more here: Recent posts and first featured


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: