Support » Fixing WordPress » Next / Previous broken on category page

  • Resolved tdellaringa

    (@tdellaringa)


    Hi there, I’m making custom category pages (like category-9.php where 9 is the cat#) and I am specifying how many posts (5) I want on each page. This is working fine, but the when I try to go to next/previous page, all I get is the same page reloaded. Here is the code on my page:

    ==============================================
    <?php if (have_posts()) : ?>
    <?php query_posts(‘showposts=5&cat=9’); ?>
    <?php while (have_posts()) : the_post(); ?>

    <div class=”entry” style=”margin:0;padding:0;”>
    <h3 id=”<?php the_ID(); ?>”>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?> (<?php the_time(‘F jS, Y’) ?>)</h3>

    <?php the_excerpt(); ?>

    </div>

    <?php endwhile; ?>

    <?php posts_nav_link(‘ or ‘, ‘You can go back
    to the previous page’, ‘you can go
    forward to the next page’); ?>.
    ====================================================

    Any ideas on why it just reloads the page instead of going to the next group of posts? The URL does change to be

    /cat/2/ etc…, yet it is only the same page with the same posts…

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Next / Previous broken on category page’ is closed to new replies.