Your Custom Post Type, by default, has an archive so you should really be using that, in which pagination will work.
If your post type is called ‘products’ then your archive will be at:
http://www.yoursite.com/products/
You then don’t need to do the WP_Query as the query has already been executed by WordPress.
If you need to change any arguments such as post_per_page you should use the pre_get_posts()
hook.
WP_Query is usually just used for running secondary queries on a page, where in this case it looks like you can use the main query.
Related Posts:
- Pagination not working with custom loop
- WP_Query Pagination on single-custom.php
- Have different number of posts on first page
- wp_pagenavi() with custom wp_query()?
- Pagination with custom post type not working
- Custom post type archive 404’s with paginate_links
- Multiple Paginations on one Page
- Custom permalink with pagination
- Custom Post Type Rewrite Rule for Author & Paging?
- Newer/Older posts links display same posts on every page
- Custom wp_query pagination – next_posts_link() or wp_pagenavi() always empty
- Pagination with custom loop
- Group list of posts by taxonomy and allow for pagination
- Custom post type archive with pagination?
- Pagination on a custom page template
- Pagination problems with multiple custom post type archive pages
- posts_nav_link on single post template
- Pagination problem in custom post type used as front page
- Custom Taxonomy archive returns 404
- WP_Query pagination using only numbers instead of /page/1 on URL
- Pagination with custom post types results in 404 issues
- Custom query form submission pagination
- Paginated Taxonomy Term Archive including one post per term
- Pagination links not showing on custom post type admin list
- Pagination on Custom Post Type: 404 Error
- Pagination in a Shortcode. Get_next_posts_link not working but get_previous_posts_link works fine right next to it
- How to load custom post archives sub-pages with ajax?
- pagination redirecting from page number url before page requested
- Pagination on category page with custom post types
- Archive template for custom post type only lists first 10
- CPT: if more than X images are in post, use pagination
- Pagination is not working in custom post type
- Custom post type not displaying all entries
- How do I move/order posts with a tag to the end?
- Add Pagination on Custom Post Type Archive
- Woocommerce search pagination not working
- How To Show All Custom Post Types In A Category Instead Of Pagination?
- Custom Post Type Pagination Paginates Only in URL Structure
- Is it possible to to use custom post type types on a page with the same slug somehow?
- WordPress custom post query with pagination
- can these 3 queries be re-written as 1 query?
- Pagination broken by naming conflict between CPT and Page
- Pagination Error : Duplicate argument being outputted
- Pagination doesn’t function properly for archive of a custom post type set as the front page
- Custom post type and custom taxonomy 404 on page 2
- Using Pagination for Custom Post Type and keeps returning 404
- Pagination for search results of custom post type [duplicate]
- Pagination of custom post type leads to 404 error
- Difference between page and paged
- All blog posts are not showing up
- 2 custom post type paging in 1 custom taxonomy
- Sticky posts limit query and pagination for a custom post type
- Pagination in custom post type archive.php not working
- Pagination links for custom post type shows correct number of links, but links result in Page not found
- Pagination for custom post type giving 404 error (but only for news page)
- how to skip a CPT element from the pager by custom field
- Pagination not working in custom post type. Help
- Custom Post Type Pagination getting 404 error
- Numeric pagination custom post type
- WordPress custom post type taxonomy paging
- WordPress doesn’t respect Page slug in custom post type url pagination. Keeps getting removed
- User Archive page for Custom Post Type – Pagination Issue
- Custom Post Type canonical link / pagination redirecting to root
- Custom post pagination not working
- CPT/Taxonomy/Postname permalink structure makes pagination break
- Use WP pagination functions on a custom page template
- Pagination in wp-admin for CPT
- Pagination not working (page/2 retunring 404 page)
- 404 error next-page [2] PageNavi custom type taxonomy
- Add pagination to custom page
- Paginate Custom Post, Old and New buttons not displaying
- Pods pagination erases my sub menu
- Custom Post Type shows pagination (w/404) or posts_per_page query, but not both
- Pagination in custom post type page template
- query and paginate multiple post types
- Custom post type archive pagination with HTML5Blank theme?
- Custom Post Type Pagination Problem in Admin Section
- Paginate custom taxonomy category with wp_custom_pagination
- Custom post type navigation on static page
- Custom pagination [duplicate]
- Pagination always adding “Next” link when results come from Custom Post Type WP_query
- Rewrite Rule & Regex – Extract ‘cat-name’ and ‘page-number’ from http://domain.com/custom-post-type/category/cat-name/page/page-number
- Using pagination with specific custom post type [duplicate]
- Pagination not working with custom loop
- how to limit query_post to first page?
- Pagination not working with custom loop
- Pagination not working with custom loop
- Archive Page Pagination not working
- Classic Custom Post Types and WP-PageNavi
- List of filtered Events is breaking paging?
- Pagination not working with custom loop
- send user to first page of results when reposting to page?
- Fourth page of custom post type archive page does not exist
- Pagination broke after updateto WordPress 3.4 [duplicate]
- WordPress pagination URL
- Unable to display paging navigation with a custom post type loop
- Pagination not working on custom post type archive
- the_post_navigation in single page with multiple taxonomies
- Archive pagination – second page shows exactly the same posts
- Two pagination in one page without AJAX