As far I read in your comment, it isn’t requires for you to handle it with a custom query. So if you register your custom post type with 'has_archive' => true
, then you can just reach the archive of the custom post type at http://www.yourwebsite.com/your-cpt-slug/
.
Important: Remember to flush the rewrite rules after you change somethign related to your permalinks. You can do it just visiting Settings > Permalinks
See how register_post_type works for any doubt, it’s always lighting.
Related Posts:
- Pagination not working with custom loop
- Custom post type pagination 404 fix?
- wp_pagenavi() with custom wp_query()?
- How do I Paginate Search Results for Custom Post Types?
- Custom Post Type Pagination Not Working On Archive Page
- Archive page…limiting posts per page
- Shortcode Displaying Custom Post Types
- Related posts by author pagination not working on the production site
- Secondary loop pagination on custom post type single post gets redirected to first page
- Pagination go to first page if i’m on last post
- Pagination throws 404
- Pretty paged permalinks in custom post type loop
- 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 pagination when CPT ‘rewrite’ rule and a page have the same slug
- paginate function in archive for custom-post-type
- Pagination problems with multiple custom post type archive pages
- custom post type paging not working past page 3
- Custom Post Type, Two categories, Two columns with Pagination
- Pagination gives 404 error
- Creating a simple pagination for custom post type templates
- WP_Query pagination using only numbers instead of /page/1 on URL
- WordPress rewrite my URL when i use pagination
- Pagination on Custom Post Type: 404 Error
- Custom Post Type Pagination & duplicate posts
- pagination redirecting from page number url before page requested
- Repeating posts when paginating random posts
- Pagination on category page with custom post types
- How to add pagination to wp_query [duplicate]
- CPT: if more than X images are in post, use pagination
- Hard code the nextpage tag into my theme?
- Pagination on with query_posts in custom post type template
- Pagination of Custom Post Types not Changing Posts
- Help with Elementor Pagination CPT archive 404 problem
- Add Pagination on Custom Post Type Archive
- How to handle paged param in post and custom-post-type?
- List all posts in a custom post type with pagination (the correct way)
- Category with post type pagination returns 404
- Pagination issue on category.php using custom post type query
- Is it possible to to use custom post type types on a page with the same slug somehow?
- WordPress custom post query with pagination
- Custom Theme With Custom Loops
- Custom Post Types strange pagination problem
- can these 3 queries be re-written as 1 query?
- Custom post type pagination – always return first page
- Number of posts in the archive
- Pagination doesn’t function properly for archive of a custom post type set as the front page
- Pagination doesnt work in custom post type
- Custom post type and custom taxonomy 404 on page 2
- Pagination on search results page
- 404 Page Not Found on /Page/2/ on Tag Page
- Pagination for custom post types – url rewriting
- next page with custom post
- Difference between page and paged
- Taxonomy rewrite pagination 404
- Pagenavi Plugin and Custom Post Type – Multipage results
- Add pagination to custom single post template
- get_query_var(‘paged’) return 0 in custom category page
- 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
- Remove custom taxonamy slug with pagination
- Add Pagination in custom Blog page template
- Custom post type, next and previous links by page title
- WordPress custom post type taxonomy paging
- WordPress doesn’t respect Page slug in custom post type url pagination. Keeps getting removed
- Custom Post Type canonical link / pagination redirecting to root
- Custom post type pagination problem – page 1 and 2 show same content
- Use WP pagination functions on a custom page template
- How to add pagination to a post loop in a custom BuddyPress tab
- Pagination not working (page/2 retunring 404 page)
- Post navigation doesn’t show (in custom template, custom post type, custom query)
- 2 custom posts types, in their own columns, one pagination for both
- Custom Pagination based on Custom Post Type
- Paginate Custom Post, Old and New buttons not displaying
- Paging not working for hierarchical custom post type
- Custom taxonomy in custom post type archive with pagination
- why custom post archive gives always no more than 10 posts despite of paging settings?
- Pagination on custom post types
- Pagination in custom post type page template
- How to display data with pagaination on backend?
- Custom Post Type Pagination Not Working or Single Posts Displaying?
- 404 error Custom search results page for custom post types with friendly URL
- query and paginate multiple post types
- Custom Post Type Pagination Problem in Admin Section
- previous_posts_link returns null when querying custom post type
- Custom Post Type Pagination for Bones Theme [duplicate]
- Pagination with Custom Post Type
- paging is not working properly on news archives page [duplicate]
- Pagination URL order
- Paged within a custom content type template [duplicate]
- Problems with pagination for a custom post type
- See the process of creating a taxonomy and tell me where I made a mistake
- Pagination for custom post type on multisite not working
- WPNavi pagination links not working on custom pages
- Custom post type pagination conflict result in 404