The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Custom Loop Pagination Issues (2 posts)

  1. Thomas Sturm
    Posted 6 years ago #

    Hi all,

    I have a custom page template with a custom loop (fetching all posts of all blogs on multisite from a global wp_globalposts table) and I used this howto which is working fine: http://wordpress.org/support/topic/custom-select-query-w-pagination?replies=11

    However, I have a problem with pagination. previous_posts_link() works as expected, but not next_posts_link(), this just returns nothing, on any page. When I manually add /page/2/ to the URL, it works as expected (and shows link back to newer posts), but there's no link to older posts either. If I echo $paged, this shows me the correct page number. What's wrong here?

  2. Thomas Sturm
    Posted 6 years ago #

    OK, fixed it. The problem was I had trash in the $totalposts variable ;-)

Topic Closed

This topic has been closed to new replies.

About this Topic