Support » Fixing WordPress » Pagination not working

Viewing 1 replies (of 1 total)
  • Hi

    When you use query_posts you have to include the pagination code.

    applying it to your code it becomes

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
          query_posts("posts_per_page=20&amp;paged=$paged"); ?>

    note that the query_posts parameters are in double quotes – that is necessary to translate the PHP variable $paged into its value and not interpret it as a text string of the word $paged.

    (I didn’t test this code.)

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