You can try this SO question Pagination when using wp_query?
Notice that their example uses the $query
variable for the WP_Query
instance, while your code uses $the_query
.
Also notice that they use paged property in the array that is being passed into WP_Query
Related Posts:
- Custom Post Type Settings page, choose page to display archive
- Adding Sticky functionality to Custom Post Type Archives
- paginate function in archive for custom-post-type
- Pagination problems with multiple custom post type archive pages
- Custom taxonomy template not working with simple loop. Multiple CPT using the same taxonomy
- WordPress custom post type archive with description
- Custom post type archive page pagination
- Archive template for custom post type only lists first 10
- Custom post type is showing custom home page, not archive page
- Custom post type archive page blank
- My archive-posttype.php template is not loading
- Custom Post Archive is not working
- Pagination doesn’t function properly for archive of a custom post type set as the front page
- How to integrate single and archive templates for custom post type in any WordPress theme
- Custom Post Type Archive template not being called
- Is possible register two archive pages for single custom post type?
- Archive page of CPT’s custom Taxonomy
- Pagination links for custom post type shows correct number of links, but links result in Page not found
- Finding the CPT archive template source
- pagination problem listing custom post types of taxonomy in wordpress
- ACF Pro Accessing fields on a Custom Post Type
- Permalink for custom post type pages not working
- Custom post pagination not working
- get first limited words from a custom post in the archive page
- Show index and not the archive for “Dog Custom Post” with default slug
- Custom post type archive page not showing on archive-posttype.php
- Custom post type with two templates
- Custom Post Type shows pagination (w/404) or posts_per_page query, but not both
- How do I make my archive page look like popular reviewing sites (e.g., Polygon and Gamespot) [closed]
- Display custom post type archive on page.php template
- Making a archive gallery page for a custom post type which already has an archive page
- Custom taxonomy in custom post type archive with pagination
- Get Non-Paginated Index of Post in Paginated Query
- why custom post archive gives always no more than 10 posts despite of paging settings?
- Pagination fault in custom post type archive page [duplicate]
- paging is not working properly on news archives page [duplicate]
- Archive Page Pagination not working
- Pagination not working for archive
- Pagination not working on custom post type archive
- Archive pagination – second page shows exactly the same posts
- WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query
- Limit the Title Length on Custom Post Type Archive Page to a Set Number of Characters
- Custom post type archive with page as parent url
- Add parent post to Custom Post Type [closed]
- Set featured image to archive.php
- Pagination broken by naming conflict between CPT and Page
- Cant get paginations on single.php to work with my custom post types
- Number of posts in the archive
- What’s the name of the custom post type yearly archive template?
- Pagination custom post type not working with rewrite slug
- Pagination Not Working for Custom Taxonomy with Custom Query – 404 Error
- Custom post type, global categories — what’s the template name?
- Pagination Error : Duplicate argument being outputted
- Which Template Page Should I Use?
- How to hyperlink content from archive page with custom post-type
- Custom WP_Query always respond with 200 status even when no entry
- Display custom post types in wp_list_pages
- Set thumbnail and title for a post type archive (not post itself!)
- Can’t use pagination with custom taxonomy
- How to set up Custom Post Type archive page as Front page
- Url to archive page for custom post type
- How can I use archive-{post_type}.php theme template?
- How to display CPT archives?
- Custom meta Title for custom post type archive from page
- Where is the sticky post option?
- Excluding a Custom Post Type with a specific tag using pre_get_posts
- Return the name of the post type
- Trouble with pagination
- Pagination 404 on Index with custom query
- previous_post_link in same taxonomy in custom post type
- current-menu-item not added on page showing custom post type (rendered with archive template)
- Alphabetically sort a taxonomy.php template by post title
- How to do admin CRUD & Pagination
- Custom ordering of CPT items not matching with the ordering of its pagination
- Custom Permalinks For CPT and pages with parent. Advanced WordPress
- Permalink problems with custom post type and custom taxonomy
- sort CPT on Custom Taxonomy Archive page
- Pagination doesnt work in custom post type
- ACF for custom post type archive pages: which hook to use?
- Pagination hitting 404 page on /page/4
- Use the custom post type archive for taxonomies?
- Custom post type permalink uses archive page to display posts
- Break up posts per page in two sections
- Custom Post type date archive for custom taxonomy
- Custom post type and custom taxonomy 404 on page 2
- Show categories of custom post type and not all posts
- Taxonomy template page not working
- Using Pagination for Custom Post Type and keeps returning 404
- CPT Archive pre_get_posts not working?
- Pagination on search results page
- 404 Page Not Found on /Page/2/ on Tag Page
- How to list custom post types on a custom post type page?
- adding custom post type “name” to single template
- CPT with its own category and tag url
- Pagination for search results of custom post type [duplicate]
- Removed custom post type archive page shows blog page
- Custom Post Type with Configurable Sidebar via ACF
- Pagination of custom post type leads to 404 error
- Pagination for custom post types – url rewriting
- Can’t replace the default sidebar with a custom sidebar on Custom Post Type in Genesis