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/)
 * Hello,
    I’m working on finishing up a site with a custom theme [url=http://eliteathletic.
   com]. I have certain sections set to display a certain number of posts. If you
   click the “older posts >>” link, it doesn’t show the posts, rather, it takes 
   you back to the homepage. Why isn’t this working properly? Do I need to create
   a specific .php file for archive posts?
 * Also- the same happens when clicking categories (i.e. “News”). Instead of taking
   you to a collection of “news” posts, it takes you back to the home page. Any 
   help? View the url above to see what I’m talking about. (Coach’s Column has the“
   older posts >>” at the bottom)

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

 *  Thread Starter [mtx212s](https://wordpress.org/support/users/mtx212s/)
 * (@mtx212s)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/older-posts-not-working/#post-1941099)
 * Help?
 * _[please do not bump – it is against the [forum rules](http://codex.wordpress.org/Forum_Welcome),
   and you actually lessen your chances to get a reply, because many helpers check
   the threads without replies first.]_
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/older-posts-not-working/#post-1941166)
 * check the usage of the ‘paged’ parameter in query_posts():
 * [http://codex.wordpress.org/Function_Reference/query_posts#Pagination_Parameters](http://codex.wordpress.org/Function_Reference/query_posts#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/#post-1941262)
 * I currently have it set up as:
    <?php query_posts(‘cat=6&posts_per_page=3’); ?
   >
 * Do I need to add:
    <?php query_posts(‘cat=6&posts_per_page=3&paged=6’); ?>
 * Thanks.
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/older-posts-not-working/#post-1941278)
 * have you read this part of the docu?
 * > Show Posts from Current Page
   > Display posts from current page:
   > `query_posts( 'paged=' . get_query_var( 'page' ) );`
 * try:
 * `<?php query_posts('cat=6&posts_per_page=3&paged=' . get_query_var( 'page' ) );?
   >`
 *  Thread Starter [mtx212s](https://wordpress.org/support/users/mtx212s/)
 * (@mtx212s)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/older-posts-not-working/#post-1941420)
 * Hmm, not working. When I click the older posts link it just displays the same
   3 posts. Here’s my code, maybe something is wrong.
 *     ```
       <?php $temp_query = $wp_query; ?>
       <?php query_posts('cat=17&posts_per_page=3&paged=' . get_query_var( 'page' ) ); ?>
       <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
   
                <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
                    <h3 class="storytitle"><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() ?> // <?php the_category(',') ?></div>
   
                    <div class="storycontent">
                        <?php the_content(__('(more...)')); ?>
                    </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)

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

 * 5 replies
 * 2 participants
 * Last reply from: [mtx212s](https://wordpress.org/support/users/mtx212s/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/older-posts-not-working/#post-1941420)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
