You are not setting the $paged
parameter anywhere in that code. You need a line something like this:
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
It really looks like you should be using a function hooked to pre_get-posts
as here and as in a lot of answer on the site.
Related Posts:
- Create a custom archive page for a custom post type in a plugin
- Custom Post Type Archive Page not showing
- Custom post type yearly/ monthly archive permalinks
- Remove current_page_parent nav class from blog index when in CPT
- WordPress Custom Post Types with a page as a parent?
- How to order adjacent posts (prev / next) by custom field value?
- How to model a hierarchy for courses, levels and lessons?
- Page is defaulting to archive page and not designated template
- custom post type archive page url to point to Page permalink
- Better to use a post type archive, page template, or shortcode for generating a highly configurable CPT archive?
- Add Settings to Custom Post Type
- Custom post type permalink structure with the category also acting as an archive
- Custom Post Type Works but Still Shows “Page Not Found”
- Rewrite custom post type url’s adding meta box values
- I can’t set meta_key in my custom post type query
- Nav menu of all posts in a custom post type
- Archive page for taxonomy of custom post type
- Add meta data to the custom post type ARCHIVES page
- Dropdown list of a custom post type
- Custom Taxonomy Breadcrumb Navigation
- Create Custom Post Type Archive Page with Sub Categories Navigation Sidebar
- Custom Post Type archive giving 404
- Custom taxonomy template not working with simple loop. Multiple CPT using the same taxonomy
- Custom query variable – get wordpress to redirect to nice permalink url
- Why are navigation items saved in the database?
- Custom-post-type-archive: posts sorted/filtered by year?
- add_rewrite_endpoint() and Custom Post Type Archive
- Custom post type archive page pagination
- Add custom post type archives to search results?
- Second Custom Post Type Archive
- How do I get the permalink structure to work like this?
- Custom Post Type Navigation on Custom Field
- is_main_query() not working for WP REST API
- WP_Query | ‘post_type’ doesn’t work
- Editable Meta Data for Custom Post Type Archive Template
- Custom Post Type with has_archive ignores my custom archive and single template
- Archives for Custom Post Types (without Pages)
- How can i change the output of posts_nav_link();
- Set up Custom-Post-Type Author Archive
- Custom post type templating problem
- Creating a navigation menu of all posts of a custom post type and their children posts?
- Extending AZIndex plugin to use custom post types and custom taxonomies
- wordpress wp_list_pages help
- Single post with a Custom Post Type returns 404, when archives of the CPT work correctly
- Custom post type archive page blank
- Creating a Custom Post Type
- Custom Post Type slug same as page name
- How can i automatically add CPT single pages as sub menu items
- Set thumbnail and title for a post type archive (not post itself!)
- How to set up Custom Post Type archive page as Front page
- Custom Permalinks For CPT and pages with parent. Advanced WordPress
- How to integrate single and archive templates for custom post type in any WordPress theme
- ACF for custom post type archive pages: which hook to use?
- Show categories of custom post type and not all posts
- Removed custom post type archive page shows blog page
- Custom Post Type with Configurable Sidebar via ACF
- Query Posts that have Custom Taxonomy
- Plain links in single-class.php and archive-class.php not working
- Archive page for custom post type and custom taxonomy
- Order Custom Post Type Archive by multiple values in functions.php
- Pagination does not work on Custom Post Type archive while trying to get load more function working
- Create a Custom Path to Archive
- Specifying a template for custom post type pages
- Previous / Next Links For Custom Post Type Sorted By Meta_Value
- How to set a ‘page’ as parent of a custom post type?
- Archive page of CPT’s custom Taxonomy
- Getting Same Description in All the Custom Taxonomy Posts
- Archive page for WordPress Custom Post Type doesn’t show pagination from paginate_links()
- 2 Custom Post Types In 1 Archive Page?
- Custom post type archive URLs with a single taxonomy
- Different number posts per page based on custom post type term id
- How to change URL for custom post type archive?
- Custom post type author issues
- pagination problem listing custom post types of taxonomy in wordpress
- ACF Pro Accessing fields on a Custom Post Type
- Do not show child pages within a file page
- Custom taxonomy with custom post type archive page
- Custome post type “tags” pick default archive instead of custom post type archive
- Help with Multi Level Category Archive Page
- Highlight a Post on archive page if it has a new comment?
- How do I make my archive page look like popular reviewing sites (e.g., Polygon and Gamespot) [closed]
- Pagination fault in custom post type archive page [duplicate]
- Permalink of custom post type partly broken
- Remove the “View” Link in Post edit Admin
- Custom Post Type Archive Links Not Working
- CPT archive as home page
- Archive page of filtered posts
- How to display the FAQ Archive page in my menu
- Why is this custom post type defaulting to archive.php?
- How can I set up the URL for a category archive for a custom post type?
- Taxonomy Query of Custom Post Displays Archive Instead of Posts
- Archive Page Pagination not working
- single-mySlug.php works: archive-mySlug.php does not. Custom Post Type
- Custom post type navigation – 404 on page 2
- Create a Page Templete to Display Table Of Content for Custom Taxonomies
- has_archive for default post type
- Custom Post Type Archive Title Lowercase
- Pagination not working only on Archive-Name.php using new WP_Query
- get_the_post_navigation not working
- Custom archive URL as a subfolder of the custom post type slug