• 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

Viewing 1 replies (of 1 total)
  • try to re-organize this section:

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

    to something like:

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

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

Viewing 1 replies (of 1 total)
  • The topic ‘Pagination not working on modified loop’ is closed to new replies.