• 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)
Viewing 5 replies - 1 through 5 (of 5 total)

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