WordPress.org

Support

Support » Themes and Templates » Older Posts not displaying

Older Posts not displaying

  • Hi,
    I have a page (called ‘News’) that I want to list my complete Blog post loop on.
    Right now it looks like this:

    <?php query_posts(); ?><?php if ( ! have_posts() ) : ?>  Nothing
    <?php endif; ?>
    <?php $countposts = 0; while(have_posts()) : the_post(); $countposts++; ?>
    <div class="newspost<?php if($countposts == 1) { ?> first2<?php } ?>">
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <?php the_title(); ?><?php the_date(); ?>
    <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
    </div>
    <?php endwhile; ?>

    But I have my link for ‘Older Posts’ at the bottom and when I click it does take me to /news/page/2
    but it starts the loop back at the beginning! So I never see the older posts.
    I’m sure its some minor detail I’m missing but I’ve tried everything I can think of and can’t get it to work correctly.

    If anyone has any suggestions I’d very much appreciate it!
    Thanks

  • The topic ‘Older Posts not displaying’ is closed to new replies.
Skip to toolbar