Ready to get started?Download WordPress


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

  1. Ash
    Posted 2 years ago #

    I don't know what to do here but pagination is driving me crazy! As you can see, "Older" points to blog/page/2 but when clicked, the site stays on blog/.

    I'm using this for pagination: http://upthemes.com/blog/2011/07/how-to-build-a-custom-page-template-for-blog-posts/#comment-9399

    The site url is http://www.grassroottech.com/blog

    Any ideas?

  2. vtxyzzy
    Posted 2 years ago #

    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); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic