Multiple Custom Query with paginate_links

Sometimes I need pagination for multiple queries on a single page. Whenever possible I use the built in WordPress functions for this purpose. However, WordPress’ pageinate_links() is really meant for WP custom queries…and preferably one query per page.

Here is an example of how you can use this built in function for your own queries! We are using an example which involves three different email lists we need to display.

First, setup your queries:

Second, display your results: Note, I am leaving out a lot of the display code, but all the relevant pagination code should be here.

Notice at the bottom of this loop we are calling our pagination function for each list. The important thing to note here is that we are using a separate ‘type’ variable so we know which list we are paginating.

Lastly, here is the actual pagination function: