Display most recent post in full, excerpts of older posts

Running 3.5.1. Is there an easy way to display my most recent post in its entirety and only display excerpts for my older posts on my home page?

Related posts

Leave a Reply

1 comment

  1. This is the basic idea behind what you want. Extend/Customize to your liking.

    if ( have_posts() ) :
        while ( have_posts() ) :
            the_post();
            the_title();
            // Incrementing a not instantiated variable results in 1
            // so there's no need to set it to 0 beforehand
            if ( 0 < $is_first_post++ ) the_excerpt();
            else the_content();
        endwhile;
    endif;
    

    Or if you want to ommit the compare and the increment operations:

    if ( have_posts() ) :
        the_post();
        the_title();
        the_content();
        while ( have_posts() ) :
            the_post();
            the_title();
            the_excerpt();
        endwhile;
    endif;
    

    // EDIT to get the one-and-only most recent post in full only:

    if (have_posts()) {
        if (2 > get_query_var('paged')) {
            the_post();
            the_title();
            the_content();
        }
        while (have_posts()) {
            the_post();
            the_title();
            the_excerpt();
        }
    }