WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Query posts pagination – How to tell if there’s more pages and link to them?

[Resolved] Query posts pagination – How to tell if there’s more pages and link to them?

  • I’m very close to finally finishing this page, but there’s one last thing that eludes me. I have a crazy query_posts call that includes all the various categories, and ids etc and of course I remembered to include paged=$_GET[paged] (not exact, but you get the idea).

    Here’s the thing. When I print the results of the “query_posts” function using “while have post, the post” etc, how do I know if there are more results and, therefore, that I need to print a “next” button? Is there an auto function for that and, if not, does something query_posts return tell me?

Viewing 2 replies - 1 through 2 (of 2 total)
  • How about $wp_query->max_num_pages to use for total pages in that query and get_next_posts_link?

    U = my hero

    I can’t use next_post_link due to my implementation it seems, but using the total number of results, I can do that part manually. It will probably end up better if I do actually since I can do a numbered series of page numbers like google.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Query posts pagination – How to tell if there’s more pages and link to them?’ is closed to new replies.
Skip to toolbar