Forums

[resolved] Next / Previous broken on category page (3 posts)

  1. tdellaringa
    Member
    Posted 6 years ago #

    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...

  2. moshu
    Member
    Posted 6 years ago #

    The solution described here works for some people (and doesn't for others):
    http://wordpress.org/support/topic/38210?replies=14#post-215414
    Give it a try.

  3. tdellaringa
    Member
    Posted 6 years ago #

    That worked perfectly Moshu, thanks! If that thread had been named slightly differently, probably would have found it. Solution makes perfect sense.

    Tom

Topic Closed

This topic has been closed to new replies.

About this Topic