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
- Pagination not working with custom loop
- Advanced search form with filters for custom taxonomies and custom fields
- Custom Taxonomy’s Label to change the text appearing in Appearance > Menu
- 404 error PageNavi custom type taxonomy | wordpress
- WP_Query pagination using only numbers instead of /page/1 on URL
- Query for posts in 2 taxonomies
- Custom post types – show specific posts
- custom taxonomy archive by year
- Add nonexisting pages to navigation
- Can custom taxonomies items have attached properties?
- Associate custom post types with normal posts
- WP 3.0.5 – Custom posts matching 2 taxonomies
- Custom Post Type Loop within Shortcode
- How can you handle rewrite rules for custom post types with option to filter on custom taxonomy terms?
- How do I make a custom taxonomy for a CPT appear inbetween title and editor boxes?
- Filtering WP_Query Dynamically on the Front-End
- Query with no terms uses index.php template instead of archive.php
- custom taxonamy and post type
- custom-taxonomy/post_name instead of the default post_type/post_name
- Getting categories of posts under a custom taxonomy
- Is it possible to to use custom post type types on a page with the same slug somehow?
- WordPress custom post query with pagination
- Add term to custom post type on draft
- Multiple tag cloud filtering
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- Show all tags on custom post type
- REST filters only firing when I have a param set
- WordPress custom post type and taxonomies
- Custom Post Type View Button in Admin Gives 400 Error
- rewrite rules hierarchical
- either single-{custom}.php 404’s OR /taxonomy/ 404’s – custom post type and taxonomy permalinks
- How do I set a post slug automatically based on taxonomy?
- Get a list of custom post type (property) when clicked on custom taxonomy 1 (rent or sale) from custom taxonomy 2 (city) page
- How to divide Subcategories into pages of parent category wordpress
- update custom taxonomy custom fields
- Filter taxonomy by CPT
- How to display “META” array in register_taxonomy
- If ACF Post Object post has custom taxonomy term…
- How to filter taxonomy of a custom post type and display it in the single post type page in the back end?
- Parent and child categories with their id in drop_down in CPT
- Custom post type post_type_link gives “page not found” on any other custom post type
- Taxonomy’s title
- Display all posts from single taxonomy term
- Custom Post Type shows pagination (w/404) or posts_per_page query, but not both
- Custom post type post taxonomies
- If taxonomy show class of active
- Custom Template Taxonomy
- Pagination not working with custom loop
- How to relate one custom post type to another custom post type
- Issue On Listing Woocommerce Parent Tag List
- Filtering custom post types using category taxonomy
- How to use wp_set_object_terms depending on page ID?