Same posts on all pages issue
-
I have a loop in which I want to display 1 post on the page and then have next and previous links to the next page of 1 post and so on.
For some reason the post on the 1st page is the same as the one on the 2nd page. So the 2nd post does not appear. Can anyone explain why?
Below is my loop:
<ul class="gallery clearfix"> <?php query_posts('category_name=events&posts_per_page=1'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); $do_not_duplicate = $post->ID; ?> <?php the_content(); ?> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?> <?php posts_nav_link(); ?>
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Same posts on all pages issue’ is closed to new replies.