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
- 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
- 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
- Custom post type posts don’t show in archive widget
- Archive for a Taxonomy of a Custom Post type
- Pagination custom post type not working with rewrite slug
- Pagination Not Working for Custom Taxonomy with Custom Query – 404 Error
- Return the name of the post type
- Pagination 404 on Index with custom query
- archive as a page, so that it can be added in the wp_menu_nav
- Custom post type and standard post not displaying or working
- Break up posts per page in two sections
- Dynamic category name in query post
- Archive Template being used instead of Category Template for Custom Post Type
- Custom Post Type Pagination on Single.php?
- How can I allow users to edit text that will be displayed on a custom post type archive page?
- How can I increase the post count for custom post types only?
- Custom post type pagination error
- Is possible register two archive pages for single custom post type?
- Custom post type paging return home page
- Pagination on custom post type without plugin
- Custom taxonomy returns 404 even with saving permalinks
- Why is my loop not populating the page with my custom taxonomy terms from my custom post type?
- Add new custom post type screen (admin area) results into 404
- next_posts_link() always generates second page link on custom post type
- How can i order my posts by post type?
- Permanent Custom Post Type
- Custom 404 redirect for a luddite
- Pagination functions won’t work
- pagination for a custom query
- Custom nav menu current item custom link problem
- How to Fix Custom WordPress Loop with Pagination on Single Post View?
- Stop Custom post type from being searched via URL
- Pagination for a Custom Taxonomy
- 404 for children in hierarchical custom post type
- WordPress Load more posts by ajax not working
- Pagination for event query
- How can I make a custom post type that loops pages in a new dashboard page, each single page is a new dashboard page (all within the back-end)?
- Archive page – problem with pagination
- Pagination not working
- 404 Error On Custom Taxonomy Pages 2, 3, etc
- CPT Archive Pagination – Page not found
- Custom post type pagination conflict result in 404