[wp-hackers] Pagination for custom loops

Kirk Wight kwight at kwight.ca
Thu Feb 21 22:25:17 UTC 2013

How do people handle pagination for custom loops (new WP_Query instances,
not $wp_query)?

It would be great to use the same function calls as the main loop
(eg. get_previous_posts_link()), but these all rely on $wp_query. I've been
hi-jacking $wp_query and resetting it with wp_reset_query() afterwards, but
then I just feel like I've used query_posts, and become sad.

Am I missing an obvious solution, or is there a better way to my own method
short of writing all my own navigation calls?

More information about the wp-hackers mailing list