• First page shows OK.
    But when I click on the second page or “Next” I just get “Page Not Found”

    Here is what I am doing

    <?php
    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts( array(
         'posts_per_page' => 5,
         'cat' => '15',
         'paged'=> $page,
      ));
    ?>
Viewing 1 replies (of 1 total)
  • WordPress already has a global variable called $paged just use that!

    <?php
    query_posts( array(
         'posts_per_page' => 5,
         'cat' => '15',
         'paged'=> $paged
      ));
    ?>

    HTH

    David

Viewing 1 replies (of 1 total)
  • The topic ‘How to add pagination on a category page’ is closed to new replies.