This is now working for me… for those of you having the same issue it turns out all the code was correct.
The problem was WordPress is setup to show 10 posts per page by default which clashed with my query (limiting it to 2 posts) to fix the issue I changed the WordPress setting (Settings / Reading in the admin dashboard) to 1.
Related Posts:
- Pagination throws 404 error on custom taxonomy archive pages
- Custom post type archive 404’s with paginate_links
- Custom Post Type Archive Page: Set Posts Per Page, Paginate
- Multiple Paginations on one Page
- Archive page…limiting posts per page
- Better to use a post type archive, page template, or shortcode for generating a highly configurable CPT archive?
- Custom Post Type Archives by Date (stored as meta value) WP3.1
- WordPress custom post type category pagination 404 Error
- Pagination throws 404
- Custom post type archive with pagination?
- Removing CPT slug from URL results in 404 error for archive page
- paginate function in archive for custom-post-type
- Custom Taxonomy archive returns 404
- Pagination gives 404 error
- Pagination with custom post types results in 404 issues
- Custom post type archive page pagination
- How can i change the output of posts_nav_link();
- Help with Elementor Pagination CPT archive 404 problem
- Custom post type / taxonomy rewrite archive page 2 gives 404
- Custom post type pagination 404
- Problems with 404, .htaccess, permalinks and WordPress custom posts locally on Snow Leopard
- Custom WP_Query always respond with 200 status even when no entry
- Custom Post Type Archive Pagination
- Problem with custom loop navigation inside the blog page
- Pagination for custom query returns 404
- Custom post type pagination problem – page 1 and 2 show same content
- 404 error next-page [2] PageNavi custom type taxonomy
- Pagination in custom loop for custom post type throwing 404 error
- paging is not working properly on news archives page [duplicate]
- How do I paginate a custom post type listing on a custom template page?
- WordPress custom post type post and category links 404
- Pagination not working for archive
- Pagination on category pages using wp_pagenavi causes 404 errors
- Custom post type REST api 404: Updating failed. No route was found matching the URL and request method
- Custom post type category pages pagination returns 404
- Adding content to archive and taxonomy pages on custom post types?
- $query->set in pre_get_posts is unintentionally affecting the backend
- WP_Query ignores post_type in category view
- How to get only posts, pages and custom post types in WordPress
- Custom Post Type Archive URL takes over page URL
- How to Add Pages Under Custom Post Type URL Structure?
- Include Custom Posts Type in Year/Month/Date Archive
- where can I see my custom post type archive template?
- Custom Taxonomy 404
- Pagination not working
- Pagination Custom post type
- Custom Post Types and archives
- Why my custom post posts aren’t showing (404 error / page not found)
- How to get “custom post type”-archive with working permalink to it?
- How to retrieve a custom post’s capability?
- Unable to get paginate_links working with a custom query [duplicate]
- Custom post type, permalinks & pagination, going wrong
- Bizarre Permalinks Issue: 404 Errors Everywhere
- Custom template page with custom archives listing by user
- Pagination for custom php code
- Root slug of taxonomy returning 404
- Custom Post Type / Two level deep taxonomy (cat. and subcat.) uri problem (error 404)
- Pagination for Custom Taxonomy Page [duplicate]
- Paging doesn’t work?
- Custom taxonomy rewrite give pagination 404
- Next and Previous Posts of Same Parent
- Next Post links not working in custom post type shortcode
- single-{post_type}.php not working
- how to remove pages loading with the archive templates
- Can I change my post type to anything and my site still work?
- Pagination doesn’t function properly for archive of a custom post type set as the front page
- page not found for single-type.php file
- How to rewrite custom taxonomy term archive to use THE SAME SLUG/front as CPT
- Using Pagination for Custom Post Type and keeps returning 404
- Get the link of the first post of a custom taxonomy in a custom taxonomy list
- Pagination for search results of custom post type [duplicate]
- How can I relate custom post types?
- All blog posts are not showing up
- Event Archive by Month
- either single-{custom}.php 404’s OR /taxonomy/ 404’s – custom post type and taxonomy permalinks
- Pagination in custom post type archive.php not working
- How to achieve a multi-taxomony layout with posts?
- Custom Post Type Pagination getting 404 error
- Numeric pagination custom post type
- Tell wordpress to show a single page instead of an archive page
- Custom post pagination not working
- CPT/Taxonomy/Postname permalink structure makes pagination break
- Some permalinks on Apache/localhost development setup return 404’s when set to anything other than plain permalinks
- Pagination in wp-admin for CPT
- Custom post type post_type_link gives “page not found” on any other custom post type
- Add pagination to custom page
- Custom Post Type shows pagination (w/404) or posts_per_page query, but not both
- Rewriting archive page slug to be different than custom post type slug
- Pulling in Related Posts based on Post Type array
- Site loads very slow for archive custom post type page
- 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 not working with custom loop
- Pagination not working with custom loop
- Custom post type pagination conflict result in 404
- Custom post type pagination not working in index.php file
- Custom Post Type posts not getting picked up in archive widgets
- How do I get an intermediary page between 2 custom post types?