paginate function in archive for custom-post-type

Here’s an analogy to help you out:

You have a book, there are 500 words per page and you open the book at a page and read. You then hand then close the book and hand it to me, asking me to read the next page. Which page?

You’ve told your query what you want, and how many per page you want, but nowhere have you specified which page you want it to grab, so it will always grab page 1.

http://codex.wordpress.org/Class_Reference/WP_Query#Pagination_Parameters

Do this using the paged query var.

Also consider using the pre_get_posts filter instead of creating a whole new query, so that you can avoid the whole WP_Query and pagination mess completely.

Leave a Comment