It seems like you need to override the canonical redirection on custom post types to get the pagination to work. It had nothing to do with the custom query used and described above, as that worked perfectly fine on a normal page and now also on a custom post type.
I figured out that I could use the following in my functions file:
/**
* Prevents custom post type pages from being redirected on pagination
*
* @param $url - root URL
*/
if (! function_exists('disable_redirect_canonical') ) :
function disable_redirect_canonical($url) {
$accepted = array('listing');
if (is_paged() && is_singular() && in_array(get_post_type(), $accepted)) { $url = false; }
return $url;
}
endif;
add_filter('redirect_canonical', 'disable_redirect_canonical');
Related Posts:
- Pagination throws 404 error on custom taxonomy archive pages
- Pagination throws 404
- custom post type paging not working past page 3
- Custom Taxonomy archive returns 404
- Paginated Taxonomy Term Archive including one post per term
- Custom Post Type Pagination & duplicate posts
- Order WordPress Custom Taxonomy Pages & Pagination Not Working
- Repeating posts when paginating random posts
- Pagination on category page with custom post types
- Pagination : How to remove /page/x/ after a ‘POST’ action on a form returning to page 1
- Pagination for Custom Taxonomy Page [duplicate]
- How do I move/order posts with a tag to the end?
- Custom taxonomy rewrite give pagination 404
- Custom Post Type Pagination Paginates Only in URL Structure
- Querying Custom Post Type, ordering by Custom Taxonomy Pagination Not Working
- Custom post type pagination 404
- Pagination Not Working for Custom Taxonomy with Custom Query – 404 Error
- Custom WP_Query always respond with 200 status even when no entry
- Can’t use pagination with custom taxonomy
- previous_post_link in same taxonomy in custom post type
- Custom post type and custom taxonomy 404 on page 2
- Taxonomy rewrite pagination 404
- 2 custom post type paging in 1 custom taxonomy
- custom taxonomy pagination 404 error
- Custom archive page for custom taxonomy and pagination issue
- Custom post type paging return home page
- Remove custom taxonamy slug with pagination
- pagination problem listing custom post types of taxonomy in wordpress
- WordPress custom post type taxonomy paging
- How to display custom post type pagination buttons when processing AJAX request
- Why is my loop not populating the page with my custom taxonomy terms from my custom post type?
- CPT/Taxonomy/Postname permalink structure makes pagination break
- Pagination with a custom post type
- I want to create pagination for my custom post type archive that i am displaying with loop
- Pagination not working (page/2 retunring 404 page)
- 404 error next-page [2] PageNavi custom type taxonomy
- Pods pagination erases my sub menu
- Custom taxonomy in custom post type archive with pagination
- Pagination fault in custom post type archive page [duplicate]
- Paginate custom taxonomy category with wp_custom_pagination
- Pagination for a Custom Taxonomy
- Pagination URL order
- how to limit query_post to first page?
- List of filtered Events is breaking paging?
- send user to first page of results when reposting to page?
- See the process of creating a taxonomy and tell me where I made a mistake
- the_post_navigation in single page with multiple taxonomies
- Custom taxonomy rewrite with query var returns %2F in URL
- WP Rewrite Rule Issue while using Custom post type & taxonomy
- How to list custom taxonomies in the back end
- Several CPT’s with same Taxonomy name but with different Terms for each
- Remove slug in URL custom post type
- Custom Permalinks with CPT and Hierarchical Taxonomies
- List all posts in a custom post type with pagination (the correct way)
- How to conditionally redirect to the post from a taxonomy page?
- How do I check if the user is on a taxonomy term parent, child or grandchild page?
- Sort and filter custom post type posts by custom taxonomy
- How do I display the grand child items of a taxonomy term?
- How to edit this code to get the categories in achieve page?
- Category with post type pagination returns 404
- Taxonomies relations
- Custom post type editor with dynamic selects, one drop down populating a second second drop down not working
- Is it better to use WordPress Custom Post Types or Taxonomies?
- Get general taxonomy name for a Custom Post Type
- custom post type pagination error 404
- Display Custom Taxonomy Alphabetically
- How To Show All Custom Post Types In A Category Instead Of Pagination?
- Import data from CSV with custom taxomony empty
- WordPress uses url different from defined in rewrite arg of custom post type
- Custom Post Type Loop with Query Var
- Full Custom Post Type List Organised by two Taxonomies
- Is it possible to use have_posts function to list custom post type posts inside a category?
- Pagination issue on category.php using custom post type query
- WordPress Doesn’t Generate Taxonomy Archive
- Shortcode not working with post counter
- URL rewriting for CTP assigned entity
- How to have this permalink structure: post_type/postname/custom_inner_page
- Suggested Post and Taxonomy structure
- How do I require the specification of term in a custom post type and custom taxonomy?
- Custom Post, set object Taxonomy terms in plugin
- Query Custom Post Type Taxonomy term with multiple parameters
- Display post content with respect to its title?
- Hierarchy and access control for Custom Post Types (CPT)
- Auto Complete Search
- Set post terms for multiple posts
- Load Custom_post_type categories post with ajax
- Custom Permalink Structure for Custom Post Type, Custom Taxonomy, Under a page
- Custom taxonomy returns 404
- Get terms that contain posts that in turn belong to other terms?
- Is it possible to to use custom post type types on a page with the same slug somehow?
- WP-API select custom taxonomy when creating a post
- WordPress custom post query with pagination
- Best method to make posts searchable, sortable and filterable – custom field, tag or category?
- First custom field value (out of several) displayed twice after query
- Custom post with more than one custom taxonomy
- How to get custom posts sub category link
- Custom while loop for hierarchical display of a taxonomy
- Terms showing up in object cache on unrelated pages
- Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)
- Get the taxonomy of a post hierarchically