Pagination not working on modified loop (2 posts)

  1. jeezyo
    Posted 3 years ago #

    Hi...i modified the following blog page template (home is a static page) so that it would only pull posts from the "blog" category. im noticing now however, that though the pagination displays correcty, if i click on page 2, it just refreshed the same page of posts, and i cant get to the older posts. wondering if somebody can take a look and guide me on how i might modify this so it works properly with my category modification, since im not sure whats wrong. thanks! http://pastebin.com/4VmJhCNs

  2. alchymyth
    Forum Moderator
    Posted 3 years ago #

    try to re-organize this section:

                <?php if (have_posts()) : $count = 0; ?>
                <?php query_posts( 'category_name=blog' ); ?>

    to something like:

                <?php if (have_posts()) : $count = 0; ?>

    i.e. add the category parameter to the existing query.

Topic Closed

This topic has been closed to new replies.

About this Topic