function category_set_post_types( $query ){
if( $query->is_category ):
$query->set( 'post_type', 'any' );
endif;
return $query;
}
add_action( 'pre_get_posts', 'category_set_post_types' );
This worked!
Related Posts:
- Custom post type pagination 404 fix?
- Custom post type archive 404’s with paginate_links
- Pagination throws 404 error on custom taxonomy archive pages
- Pagination throws 404
- Custom Taxonomy archive returns 404
- Pagination gives 404 error
- Pagination with custom post types results in 404 issues
- Help with Elementor Pagination CPT archive 404 problem
- Custom post type pagination 404
- Custom WP_Query always respond with 200 status even when no entry
- Problem with custom loop navigation inside the blog page
- Pagination for custom query returns 404
- 404 error next-page [2] PageNavi custom type taxonomy
- Pagination in custom loop for custom post type throwing 404 error
- 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 with custom loop
- Custom post type single page returns 404 error
- WP_Query Pagination on single-custom.php
- Getting hierarchical custom post type permalinks to work just like pages
- Have different number of posts on first page
- wp_pagenavi() with custom wp_query()?
- Custom permalink with pagination
- Custom wp_query pagination – next_posts_link() or wp_pagenavi() always empty
- Pagination with custom loop
- Group list of posts by taxonomy and allow for pagination
- Pagination on a custom page template
- How to remove CPT comment feed from head?
- Pagination problems with multiple custom post type archive pages
- posts_nav_link on single post template
- Pagination problem in custom post type used as front page
- WP_Query pagination using only numbers instead of /page/1 on URL
- Custom query form submission pagination
- Paginated Taxonomy Term Archive including one post per term
- Pagination links not showing on custom post type admin list
- Pagination on Custom Post Type: 404 Error
- Pagination in a Shortcode. Get_next_posts_link not working but get_previous_posts_link works fine right next to it
- custom post type and custom taxonomy url conflict
- How to load custom post archives sub-pages with ajax?
- pagination redirecting from page number url before page requested
- An empty Custom Post Type Archive page returns 404 in WP 3.1
- How To Create A Custom Taxonomy 404 Page
- Pagination on category page with custom post types
- CPT: if more than X images are in post, use pagination
- Custom taxonomy in URL showing 404
- Custom Post Type Draft Preview Goes to 404
- Custom post type not displaying all entries
- How do I display content to users who are not logged in instead of 404 on Private custom posts?
- How do I move/order posts with a tag to the end?
- Add Pagination on Custom Post Type Archive
- Woocommerce search pagination not working
- How To Show All Custom Post Types In A Category Instead Of Pagination?
- Is it possible to to use custom post type types on a page with the same slug somehow?
- WordPress custom post query with pagination
- Custom post type permalink tag 404
- Custom post type / taxonomy rewrite archive page 2 gives 404
- can these 3 queries be re-written as 1 query?
- Page not found for custom post type UI plugin and taxonomy
- Custom rewrite to fetch feed data
- Pagination doesn’t function properly for archive of a custom post type set as the front page
- page not found for single-type.php file
- One Custom post type 404’s others don’t
- Custom post type and custom taxonomy 404 on page 2
- Custom taxonomy template shows 404 Error
- Pagination for search results of custom post type [duplicate]
- Difference between page and paged
- All blog posts are not showing up
- Safe to throw 404 error in request filter?
- either single-{custom}.php 404’s OR /taxonomy/ 404’s – custom post type and taxonomy permalinks
- Pagination in custom post type archive.php not working
- Pagination links for custom post type shows correct number of links, but links result in Page not found
- Pagination for custom post type giving 404 error (but only for news page)
- how to skip a CPT element from the pager by custom field
- Pagination not working in custom post type. Help
- Custom post type single page 404
- Custom Post Type Pagination getting 404 error
- Numeric pagination custom post type
- WordPress custom post type taxonomy paging
- WordPress doesn’t respect Page slug in custom post type url pagination. Keeps getting removed
- Custom Post Type Front Page Gives 404
- Custom Post Type canonical link / pagination redirecting to root
- Custom post pagination not working
- CPT/Taxonomy/Postname permalink structure makes pagination break
- Use WP pagination functions on a custom page template
- Pagination in wp-admin for CPT
- Pagination not working (page/2 retunring 404 page)
- Add pagination to custom page
- Paginate Custom Post, Old and New buttons not displaying
- Pagination in custom post type page template
- query and paginate multiple post types
- Custom post type archive pagination with HTML5Blank theme?
- Custom Post Type Pagination Problem in Admin Section
- Custom post type navigation on static page
- Custom pagination [duplicate]
- Pagination not working with custom loop
- Pagination not working with custom loop
- Pagination for custom post type on multisite not working
- Single custom post type page redirect to 404 page
- Custom post type pagination conflict result in 404
- Custom post type single page fine for admin, 404 from front