Pagination/infinite scroll with WP_Query and multiple loops

This might not solve your problem, but it will help you in future to create custom queries. Paginating more than one query can get extremely tricky. By default the build in pagination in WordPress don’t have this logic to paginate multiple queries. You will have to run multiple queries and merge them in some way.

OK, now to what I would like to point out. You should have a look at WP_Query in the codex to see how to properly create a custom query. Your problem here is that you are running three custom queries without resetting any of them. This will break any other query that follows the previous one

It is of utmost importance to reset every custom query that you create. You HAVE TO do that. You can do this by just calling wp_reset_postdata(); after each query to restore the $post variable. Look at the examples in the links provided

Leave a Comment