• I am just doing:

    <?php query_posts("cat=1");?>
    <?php next_posts_link('&laquo; Previous Entries') ?>
    <?php previous_posts_link('Next Entries &raquo;') ?>

    And when i go to page 2, it shows the same first 20 posts on the first page.

    How do i do previous and next links when only showing one category on the Main page?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Use this instead:
    <?php query_posts($query_string."&cat=1");?>

    By leaving out the query_string, you’re ignoring all the variables being set by the system. Such as which page number you’re viewing, among others.

    Thread Starter westondeboer

    (@poil11)

    That was it! Thanks a bunch!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Previous entries doesn’t work when doing custom query?’ is closed to new replies.