• I’m trying to get the latest post to display in full on the front page, then the earlier posts as excerpts. On the older pages (blog.com/2/ using older/newer navigation), I want jsut the list of excerpts. The code below works great, but continues to display the latest post in full on the older pages. I’ve tried som if/then statements to only make it display on the frontpage, but can’t quite make it work. Any suggestions?

    Thanks!

    Setting up the latest post to display in full:

    <?php $my_query = new WP_Query('showposts=1');
    while ($my_query->have_posts()) : $my_query->the_post();
    $do_not_duplicate = $post->ID; ?>

    Div for ONLY the latest post:

    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    CONTENT
    </div>

    <?php endwhile; ?>

    Now my Loop showing only older posts:

    <?php if (have_posts()) : while (have_posts()) : the_post();
    if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>

    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    CONTENT
    </div>
    <?php endwhile; endif; ?>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Latest post in full, older posts in excerpt’ is closed to new replies.