It turns out that in my functions.php file, I had the following function:
function limit_posts_per_archive_page() {
if ( is_tax('project_categories') )
$limit = 9999;
else
$limit = get_option('posts_per_page');
set_query_var('posts_per_archive_page', $limit);
}
add_filter('pre_get_posts', 'limit_posts_per_archive_page');
This was an old function modifying the pagination on the front-end, and it turns out that this was causing the error.
Removing the function fixed this.
Related Posts:
- Custom pagination for custom post types (by names)
- next_post_link() not working for single custom post type post
- Pagination with custom post type not working
- Admin Filter – Add Post Type Description on Post Type Page
- how to group custom post types
- How to add custom columns to Custom Post Type admin screen
- Number of pages – multiple (custom) post types
- WordPress search: pretty URLs (permalinks), custom post types and pagination
- Custom post type Admin Page
- Multiple Paginations on one Page
- Ordering Post 2 Post admin meta box by meta from CPT
- Custom Post Type Rewrite Rule for Author & Paging?
- Newer/Older posts links display same posts on every page
- Custom post type archive with pagination?
- Displaying Post Title on Post Edit page?
- Fix custom query pagination without changing site-wide posts-per-page settings
- Display “Post 2 of 4” on single post page?
- Make a custom column sortable, by custom post count
- Using multiple instances of wp_editor in Custom Post Type admin area
- How i add new link after Edit | Quick Edit | Trash | View in quick edit section
- Custom Post Types, Page Templates and Pagination. Why do I get a 404 Error?
- How to add post_author column to custom post type
- Use a textarea for a custom post type
- Restrict categories to a custom post type
- Adding menu_order to CPT admin page
- Custom post type archive page pagination
- How to make post sticky in the admin page?
- Archive template for custom post type only lists first 10
- Pagination : How to remove /page/x/ after a ‘POST’ action on a form returning to page 1
- Unable to retrieve any posts of CPT in wp-admin
- How can i change the output of posts_nav_link();
- How to alter WP-JSON main query or best practise for custom endpoints
- Pagination is not working in custom post type
- Previous/Next Link by Meta Value in CPT
- Admin Pointers on a custom post type
- Custom post type (with parent-child relationship) singular page with pagination
- Addition of custom option panel crashes Media Library & Admin Area
- How do you paginate a query grouped by month?
- manage_edit-{post_type}_sortable_columns sorts, but wrong!
- Custom Post Type Pagination Paginates Only in URL Structure
- Querying Custom Post Type, ordering by Custom Taxonomy Pagination Not Working
- pagination not working for category.php (custom post types in categories)
- Custom post type pagination 404
- It’s possible to hide body copy box for a custom post type?
- Show data from one Custom Post Type in another Custom Post Type
- Pagination broken by naming conflict between CPT and Page
- WordPress custom post type capabilities issue
- Pagination Error : Duplicate argument being outputted
- Trouble with pagination
- previous_post_link in same taxonomy in custom post type
- How to do admin CRUD & Pagination
- Create field of Custom Post Types
- Pagination hitting 404 page on /page/4
- Pagination of custom post type leads to 404 error
- Sorting custom post types in edit.php : Post disappear
- Pagination on a page
- How to customize `Edit-Post` Screen
- Single parent post lists child posts with pagination
- Using custom post type as front home page pagination not working
- Custom Post Type, Pagination and 404s?
- 2 custom post type paging in 1 custom taxonomy
- jQuery UI & Admin (Calendar)
- Problem with custom loop navigation inside the blog page
- pagination for custom post type archive page
- custom taxonomy pagination 404 error
- Sticky posts limit query and pagination for a custom post type
- After inserting new post with wp_insert_post() the post is not visble to WP_Query, but the same WP_Query works for post inserted from wp-admin panel
- Pagination Not Working When Used With WP_Query() `offset` Property
- Problems in paginate_links with custom query loop and MB-Relationships
- Make pagination work as a carousel (custom query)
- User Archive page for Custom Post Type – Pagination Issue
- I want to create pagination for my custom post type archive that i am displaying with loop
- How to get a custom post type archive paged when using a custom field for post sorting?
- 404 error next-page [2] PageNavi custom type taxonomy
- Group based routing and administration
- Limit Number of Custom Post Type Dashboard
- Pods pagination erases my sub menu
- Get Non-Paginated Index of Post in Paginated Query
- Custom post type with Filter and Page Nav
- Pagination custom post types outside loop
- Paginating custom query on category template
- Custom post type blog pagination conflict
- Custom post type pagination, single page issue
- Pagination always adding “Next” link when results come from Custom Post Type WP_query
- Show a custom field instead of username in the backend author area
- Can’t preview custom post – Redirected to home page
- Pagination not working with custom loop
- Pagination not working with custom loop
- How to make an admin create/edit post page to look like taxonomy page?
- Archive Page Pagination not working
- Classic Custom Post Types and WP-PageNavi
- List of filtered Events is breaking paging?
- Pagination not working on homepage
- How do I paginate a custom post type listing on a custom template page?
- admin search of pages returns custom post types
- WordPress getting problem with pagination [duplicate]
- What Is My Fault With This WP_QUERY ? [ Pagination Problem ]
- Pagination not working only on Archive-Name.php using new WP_Query
- Custom order of CPT posts by title, in wp-admin area by default
- Custom post type pagination conflict result in 404