WordPress.org

Ready to get started?Download WordPress

Forums

Older Posts not displaying (1 post)

  1. jimmytuesday
    Member
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic