Title: &quot;Older Posts&quot; not working&#8230;
Last modified: August 19, 2016

---

# "Older Posts" not working…

 *  [mtx212s](https://wordpress.org/support/users/mtx212s/)
 * (@mtx212s)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/older-posts-not-working-1/)
 * The “Older Posts >>>” link on my page isn’t functioning properly, and I’m not
   sure why. Instead of taking you to another page of posts, it either displays 
   the same posts, or ends up at the home page. Please view the site [eliteathletic.
   com] and under the “Coach’s Column,” click the “Older Posts >>>” link to see 
   what I mean. Here is my current code:
 *     ```
       <?php $temp_query = $wp_query; ?>
       <?php query_posts('cat=6,7,8,9,10,11,12&posts_per_page=3'); ?>
        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
   
              <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
                    <h3 class="column"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
                    <div class="meta"><?php the_time('n.j.Y') ?> // By <?php the_author() ?></div>
   
                    <div class="storycontent">
                        <?php the_excerpt(); ?>
       <a href="<?php the_permalink(); ?>" title="Read the rest of <?php the_title(); ?>" class="more-link">Read more...</a>
                    </div>
   
                    <div class="feedback">
                        <?php wp_link_pages(); ?>
                        <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
                    </div>
   
                 </div>
   
                 <?php comments_template(); // Get wp-comments.php template ?>
   
                 <?php endwhile; else: ?>
                    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
                 <?php endif; ?>
   
                 <?php posts_nav_link(' — ', __('&laquo; Newer Posts'), __('Older Posts &raquo;')); ?>
   
                 <?php wp_footer(); ?>
       ```
   

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/older-posts-not-working-1/#post-1951977)
 * try to add the ‘paged’ parameter to this line:
 *     ```
       <?php query_posts('cat=6,7,8,9,10,11,12&posts_per_page=3'); ?>
       ```
   
 * for instance:
 *     ```
       <?php query_posts('cat=6,7,8,9,10,11,12&posts_per_page=3&paged=' . get_query_var( 'page' )); ?>
       ```
   
 * > Show Posts from Current Page
   > Display posts from current page:
   > `$query = new WP_Query( 'paged=' . get_query_var( 'page' ) );`
 * [http://codex.wordpress.org/Function_Reference/WP_Query#Pagination_Parameters](http://codex.wordpress.org/Function_Reference/WP_Query#Pagination_Parameters)
 *  Thread Starter [mtx212s](https://wordpress.org/support/users/mtx212s/)
 * (@mtx212s)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/older-posts-not-working-1/#post-1952242)
 * Still isn’t working. I’m confused and I have no idea how to fix it. Any other
   ideas?
 *  Thread Starter [mtx212s](https://wordpress.org/support/users/mtx212s/)
 * (@mtx212s)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/older-posts-not-working-1/#post-1952246)
 * All of my posts are displayed using queries, is there something else that I need
   to do so the links take you to the next page of posts?
 *  Thread Starter [mtx212s](https://wordpress.org/support/users/mtx212s/)
 * (@mtx212s)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/older-posts-not-working-1/#post-1952252)
 * ANY other help?
 *  [eugenealegiojo](https://wordpress.org/support/users/eugenealegiojo/)
 * (@eugenealegiojo)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/older-posts-not-working-1/#post-1952315)
 * I also have the same problem and it solved by doing the following:
    Change `get_query_var('
   page' )` To `get_query_var( 'paged' )`
 * Hope it helps.

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

The topic ‘"Older Posts" not working…’ is closed to new replies.

 * 5 replies
 * 3 participants
 * Last reply from: [eugenealegiojo](https://wordpress.org/support/users/eugenealegiojo/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/older-posts-not-working-1/#post-1952315)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
