Recent posts and first featured

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 class="main-content span8">
            <!--Titre article-->
            <h4><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h4>
            <!--Extrait article-->
            <?php the_excerpt(__('(more…)')); ?>
<?php endwhile; ?>

Read more here: Recent posts and first featured

Leave a Reply

Your email address will not be published. Required fields are marked *