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
- Create an archive page by combining two post type
- WordPress Custom Post Type Archive, filter by category and get pagination working
- Custom Post Type Rewrite – Page Not Found
- What am I doing wrong with my taxonomy?
- yet another: custom post type with pagination not working in WordPress
- How can I generate a list of post-type specific categories?
- Custom Post Type tag taxonomy “Page Not Found”
- Pods pagination erases my sub menu
- Custom Post Type shows pagination (w/404) or posts_per_page query, but not both
- Custom nav menu current item custom link problem
- Paging not working for hierarchical custom post type
- Custom taxonomy in custom post type archive with pagination
- How to Fix Custom WordPress Loop with Pagination on Single Post View?
- date archive future posts
- Get Non-Paginated Index of Post in Paginated Query
- do action inside a class is not working
- Cannot use pages created on WP
- why custom post archive gives always no more than 10 posts despite of paging settings?
- Rewriting archive page slug to be different than custom post type slug
- Custom post type with Filter and Page Nav
- Updated from 3.8 to 4.2 and all post types changed to “post”
- Pagination on custom post types
- Pulling in Related Posts based on Post Type array
- Pagination in custom post type page template
- Custom Post type archives / categories give 404
- Pagination fault in custom post type archive page [duplicate]
- How to display data with pagaination on backend?
- Site loads very slow for archive custom post type page
- Pagination custom post types outside loop
- Custom Post Type Pagination Not Working or Single Posts Displaying?
- 404 error Custom search results page for custom post types with friendly URL
- Paginating custom query on category template
- Keep same archive.php for post from archive?
- Stop Custom post type from being searched via URL
- query and paginate multiple post types
- Custom post type archive pagination with HTML5Blank theme?
- archive.php can’t find categorized posts
- Custom Post Type Pagination Problem in Admin Section
- CPT unsaved draft gives error 404 – when Post Formats support enabled
- archive-{custom_post_type}.php not getting recognized wordpress
- Paginate custom taxonomy category with wp_custom_pagination
- Archive.php is not displaying tags
- How to display custom post types AND regular posts separately on a shared taxonomy archive?
- Pages displays correctly but returning a 404 error in http header.
- Custom post type navigation on static page
- Custom pagination [duplicate]
- previous_posts_link returns null when querying custom post type
- Custom Post Type Pagination for Bones Theme [duplicate]
- Custom post type category page not working
- Custom post type blog pagination conflict
- Custom post type pagination, single page issue
- Pagination for a Custom Taxonomy
- 404 for children in hierarchical custom post type
- Custom post types with date based archive
- Pagination always adding “Next” link when results come from Custom Post Type WP_query
- Pagination with Custom Post Type
- Custom Post Types Archives and daily/monthly joke
- Rewrite Rule & Regex – Extract ‘cat-name’ and ‘page-number’ from http://domain.com/custom-post-type/category/cat-name/page/page-number
- Using pagination with specific custom post type [duplicate]
- Pagination URL order
- Pagination not working with custom loop
- WordPress Load more posts by ajax not working
- how to limit query_post to first page?
- Paged within a custom content type template [duplicate]
- How can I set up the URL for a category archive for a custom post type?