Title: Next Previous loads index posts
Last modified: August 19, 2016

---

# Next Previous loads index posts

 *  Resolved [fundin](https://wordpress.org/support/users/fundin/)
 * (@fundin)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/next-previous-loads-index-posts/)
 * I’m having a problem with my next previous buttons, I just added them and they
   go to the right pages (page2,3 etc) but it seems to load the same posts as in
   the index page.
 * Here is my wordpress webpage/blog:
    [http://www.josefinfundin.com](http://www.josefinfundin.com)
 * any idea what could be wrong?
 * many thanks in advance

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/next-previous-loads-index-posts/#post-1761270)
 * do you use any sort of custom query? as in query_posts
 *  Thread Starter [fundin](https://wordpress.org/support/users/fundin/)
 * (@fundin)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/next-previous-loads-index-posts/#post-1761273)
 * I don’t think so really..
 *     ```
       <?php get_header(); ?>
   
       <div id="content" class="clearfix">
   
       	<div id="left-col2">
   
       			<div id="left-top3">
   
       							<?php $featured = new WP_Query('category_name='.get_option('woo_featured_category').'&showposts=5&order=DESC'); ?>
       <?php while ($featured->have_posts()) : $featured->the_post(); ?>
       <div id="left-top2"></div>
       <div id="left-col3">
       <div class="left-content">
       <div class="relative">
       								<div class="clearfix">
   
                           </p>
   
       <div id="div-1a">
       <span class="day"><?php the_time('j'); ?></span>
       <span class="month"><?php the_time('M'); ?></span>
       </div>
   
       						<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>				
   
       <a href="<?php the_permalink() ?>"><?php
       	if ( has_post_thumbnail() )
       		the_post_thumbnail( 'thumbnail' );
       	else
   
       ?></a>
   
       <?php if ( get_post_meta($post->ID,'image', true) ) { ?> <!-- DISPLAYS THE IMAGE URL SPECIFIED IN THE CUSTOM FIELD -->		
   
       <a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>"><img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo get_post_meta($post->ID, "image", $single = true); ?>&h=<?php if ( get_option('woo_image_height') <> "" ) { echo get_option('woo_image_height'); } else { ?>135<?php } ?>&w=<?php if ( get_option('woo_image_width') <> "" ) { echo get_option('woo_image_width'); } else { ?>225<?php } ?>&zc=1&q=80" alt="<?php the_title(); ?>" class="featured-preview" /></a>          	
   
                   					<?php } ?>
   
       		        									<?php $GLOBALS['exclude'] = $post->ID; ?>     												
   
       <?php the_content(__('(more...)')); ?>
   
       <div class="category clearfix" >
        <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></div>				
   
       								</div>
       							<div class="divider"></div>
       </div><!--/relative-->
       </div><!--/left-content-->
       </div><!--/left-col3-->
       <div id="left-bottom"></div><br /><br /><br />
       							<?php endwhile; ?>
       <center><div class="navigation2"><p><?php posts_nav_link(' ','Back','Next'); ?></p></div></center>
   
       					<div class="divider"></div>
       								<div class="clearfix">
   
       					</div><!--inner-columns-->
   
       				</div><!--left-top-->
   
       	</div><!--left-col-->
   
       	<div id="right-col">
       		<?php get_sidebar(); ?>
       	</div>
   
       </div><!--content-->
   
       </div><!--content-back-->
   
       <?php get_footer(); ?>
       ```
   
 *  Thread Starter [fundin](https://wordpress.org/support/users/fundin/)
 * (@fundin)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/next-previous-loads-index-posts/#post-1761274)
 * sorry for the massive code, just thought it’s best to see in its whole
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/next-previous-loads-index-posts/#post-1761278)
 * [http://wordpress.org/support/topic/adding-pagination-to-a-wp_query-loop?replies=16](http://wordpress.org/support/topic/adding-pagination-to-a-wp_query-loop?replies=16)
 * Yep, you do have a query in there, using WP_Query
    [http://codex.wordpress.org/Function_Reference/WP_Query](http://codex.wordpress.org/Function_Reference/WP_Query)
 * This thread has some info about getting pagination added onto your query
    [http://wordpress.org/support/topic/adding-pagination-to-a-wp_query-loop?replies=16](http://wordpress.org/support/topic/adding-pagination-to-a-wp_query-loop?replies=16)
 *  Thread Starter [fundin](https://wordpress.org/support/users/fundin/)
 * (@fundin)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/next-previous-loads-index-posts/#post-1761281)
 * haha yeah, there sure is a query 🙂
 * AHHHHH and like magic it is fixed.. I was missing the “paged” tag
 * thx

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Next Previous loads index posts’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [fundin](https://wordpress.org/support/users/fundin/)
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/next-previous-loads-index-posts/#post-1761281)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
