WordPress.org

Support

Support » How-To and Troubleshooting » Pagination driving me crazy! Older points to page 2 but stays on page 1

Pagination driving me crazy! Older points to page 2 but stays on page 1

Viewing 1 replies (of 1 total)
  • Try changing this:

    <?php query_posts('post_type=post&post_status=publish&posts_per_page=10&paged='. get_query_var('paged')); ?>

    to this:

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : ((get_query_var('page')) ? get_query_var('page') : 1);
    query_posts('post_type=post&post_status=publish&posts_per_page=10&paged='. $paged); ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Pagination driving me crazy! Older points to page 2 but stays on page 1’ is closed to new replies.