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:
- Custom pagination for custom post types (by names)
- next_post_link() not working for single custom post type post
- Pagination with custom post type not working
- Changing the URL Structure of a Paginated Custom Post
- Number of pages – multiple (custom) post types
- WordPress search: pretty URLs (permalinks), custom post types and pagination
- Multiple Paginations on one Page
- Custom Post Type Rewrite Rule for Author & Paging?
- Posts in Multiple Columns and Rows with one single loop
- Newer/Older posts links display same posts on every page
- Custom post type archive with pagination?
- Pagination in plugin with custom post type
- Fix custom query pagination without changing site-wide posts-per-page settings
- Display “Post 2 of 4” on single post page?
- Custom Post Types, Page Templates and Pagination. Why do I get a 404 Error?
- Custom post type archive page pagination
- Pagination problem
- Custom post type archive not regarding ‘posts_per_page’ => -1
- Setting posts per page in query_posts
- Archive template for custom post type only lists first 10
- Pagination : How to remove /page/x/ after a ‘POST’ action on a form returning to page 1
- How i can add ‘N’ page of ‘N’ pages under posts loop?
- How can i change the output of posts_nav_link();
- How to alter WP-JSON main query or best practise for custom endpoints
- Pagination is not working in custom post type
- Page vs Custom Post Types Differences/Issues
- How to display all posts from standard posts to custom post types in a loop with pagination?
- Previous/Next Link by Meta Value in CPT
- Custom post type (with parent-child relationship) singular page with pagination
- Custom template Page 2 not working
- How do you paginate a query grouped by month?
- custom post type pagination error 404
- Custom Post Type Pagination Paginates Only in URL Structure
- Querying Custom Post Type, ordering by Custom Taxonomy Pagination Not Working
- Pagination with custom query, custom search form, single and pages, ajax and no plugins
- pagination not working for category.php (custom post types in categories)
- Custom post type pagination 404
- 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
- Trouble with pagination
- How to do admin CRUD & Pagination
- Pagination hitting 404 page on /page/4
- 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
- All blog posts are not showing up
- Custom post pagination trouble
- Single parent post lists child posts with pagination
- Custom Post Type, Pagination and 404s?
- 2 custom post type paging in 1 custom taxonomy
- Problem with custom loop navigation inside the blog page
- custom taxonomy pagination 404 error
- Sticky posts limit query and pagination for a custom post type
- Pagination in custom post type archive.php not working
- Custom Post Type Pagination getting 404 error
- Numeric pagination custom post type
- Problems in paginate_links with custom query loop and MB-Relationships
- Make pagination work as a carousel (custom query)
- User Archive page for Custom Post Type – Pagination Issue
- Custom post pagination not working
- CPT/Taxonomy/Postname permalink structure makes pagination break
- I want to create pagination for my custom post type archive that i am displaying with loop
- How to get a custom post type archive paged when using a custom field for post sorting?
- Pagination in wp-admin for CPT
- 404 error next-page [2] PageNavi custom type taxonomy
- Add pagination to custom page
- Pods pagination erases my sub menu
- Custom Post Type shows pagination (w/404) or posts_per_page query, but not both
- Get Non-Paginated Index of Post in Paginated Query
- Pagination custom post types outside loop
- Paginating custom query on category template
- Custom post type archive pagination with HTML5Blank theme?
- 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]
- 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
- Pagination not working on homepage
- send user to first page of results when reposting to page?
- How do I paginate a custom post type listing on a custom template page?
- Fourth page of custom post type archive page does not exist
- Pagination broke after updateto WordPress 3.4 [duplicate]
- WordPress pagination URL
- WordPress getting problem with pagination [duplicate]
- What Is My Fault With This WP_QUERY ? [ Pagination Problem ]
- Unable to display paging navigation with a custom post type loop
- Pagination not working only on Archive-Name.php using new WP_Query
- Pagination not working on custom post type archive
- Two pagination in one page without AJAX
- “Page not found” while on page 2 from pagination menu
- Custom post type pagination not working in index.php file