WordPress.org

Ready to get started?Download WordPress

Forums

Older Entries link not working (3 posts)

  1. asiostudio
    Member
    Posted 2 years ago #

    Hello,
    I'm having some trouble with a category page that I've made. The "Read Older Entries" link on the bottom of the page just displays the same posts as before. I read on another forum to try replacing:

    <?php if (have_posts()) : ?>
     <?php query_posts('cat=3'); ?>

    with

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('cat=3&paged='.$paged); ?>
    <?php if (have_posts()) : ?>

    ... which I did, to no avail.
    (Mind you, these are examples pulled from the post itself, not my coding.)

    One thing I'm noticing is that the problem usually occurs when someone needs to pull a specific category's posts, using the <?php query_posts('cat=X'); ?> code.

    This is not something I have previously had trouble with until just recently when another client called me up with the same problem. Is there some sort of update from WordPress that's doing this? Is there some way to fix it? If not, is there an alternative method for forcing a display of a specific category's posts?

    Any help would be greatly appreciated,
    [sig moderated as per the Forum Rules]

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Is there some sort of update from WordPress that's doing this

    Nope. The amended code you posted above should work.

  3. asiostudio
    Member
    Posted 2 years ago #

    I had hoped so, but alas, no such luck.

    Do you know of any other method to display this sort of information?

Topic Closed

This topic has been closed to new replies.

About this Topic