Custom post types are not included in the ordinary archives by default, even if registered with the taxonomies
argument. You will need to add the post type to the query yourself.
add_action(
'pre_get_posts',
function($qry) {
if ($qry->is_main_query() && $qry->is_category()) {
$qry->set('post_type',array('post','yourposttype'));
}
}
);
Related Posts:
- Adding content to archive and taxonomy pages on custom post types?
- Filtering a custom post type by custom taxonomy in archive template
- Permalink Structure for Multiple Post Type Archives by Taxonomy
- get term archive url / link
- How to get the custom post type from an archive page?
- Meta_Query as a way how to setup CPT permalinks – is it a good thing?
- $query->set in pre_get_posts is unintentionally affecting the backend
- Pagination throws 404 error on custom taxonomy archive pages
- Setting up custom post type archives in WP3.1? Any luck?
- Proper way of making custom post type landing page or archive page
- Custom Post Type Archive Page: Set Posts Per Page, Paginate
- Custom Post Type Archives with 0 Posts Redirects as 404
- How to show more posts on an archive page?
- Archive page with multiple taxonomies rewrite
- Archive page…limiting posts per page
- WP 3.1 – archive pages for custom content types possible now without a plugin?
- Date archives for custom post type
- Custom Post Type Archive URL takes over page URL
- Custom comment status possible?
- Display all custom post types in archives.php
- How to Add Pages Under Custom Post Type URL Structure?
- Custom Post Type Archives by Date (stored as meta value) WP3.1
- Removing CPT slug from URL results in 404 error for archive page
- Multiple post types in archives (filter?)
- How to let custom post type posts show in standard post archive (like in homepage)?
- Include Custom Posts Type in Year/Month/Date Archive
- where can I see my custom post type archive template?
- Call different archive page based on post type
- Custom post type archive sorted and grouped by date in post meta field
- Custom-post-type-archive: posts sorted/filtered by year?
- Custom Post Types and archives
- How to get “custom post type”-archive with working permalink to it?
- Custom post types archive redirect
- just can’t get date-based archives per post-type to work
- Custom template page with custom archives listing by user
- Changing number of posts per page on CPT-archive.php, have tried 20-30 code chunks so far
- Root slug of taxonomy returning 404
- How to modify archive query with pre_get_posts to append CPTs?
- Change CPT archive title
- How to get post type and month/year before while loop for date.php file
- Custom archive page for CPT UI
- How to display custom post in archive section of the wordpress page?
- The loop seems stuck to a single (now deleted) post
- Use “archive” as slug for custom post type
- Is it better to use filter for the_content in archive pages?
- How can I get this request to use the Custom Post Type page template instead?
- Custom post type posts don’t show in archive widget
- Archive for a Taxonomy of a Custom Post type
- Problems with 404, .htaccess, permalinks and WordPress custom posts locally on Snow Leopard
- What’s the name of the custom post type yearly archive template?
- multiple custom post type on category page
- How can I use archive-{post_type}.php theme template?
- Taxonomy archive 404ing (not term archive)
- Return the name of the post type
- Custom taxonomy or custom page templates?
- archive as a page, so that it can be added in the wp_menu_nav
- Can anyone clarify difference between archive-{posttype}.php, type-{posttype} and date.php?
- How do I add custom HTML to the content of an archive page’s posts?
- Only show posts with a specific term of an associated taxonomy in a custom post type archive
- Use the custom post type archive for taxonomies?
- Custom Post Type setup
- Dynamic category name in query post
- Custom Post Type Archive Pagination
- Need to have an archive widget which organizes and displays a custom post type using a custom date field
- Archive Template being used instead of Category Template for Custom Post Type
- pre_get_posts works in post type archive but not in single post
- Menu’s breaking, now showing all page links on site
- How can I allow users to edit text that will be displayed on a custom post type archive page?
- How can I increase the post count for custom post types only?
- How can I tell if I’m on a custom post type archive page?
- Is possible register two archive pages for single custom post type?
- users post count
- Custom Post Type Archive Page showing as 404
- Custom WordPress theme not displaying posts from category
- Custom Post Type archive page listing a 404 or single post
- Order archive custom posts by taxonomy term [duplicate]
- Custom post type pagination problem – page 1 and 2 show same content
- The page or ad listing you are trying to reach no longer exists or has expired
- One of my headings is mysteriously coming up as a link in my CPT Archive
- I broke it! Custom post type archive gets redirected to home
- Custom Post Type tag taxonomy “Page Not Found”
- Custom nav menu current item custom link problem
- Custom Post type archives / categories give 404
- Stop Custom post type from being searched via URL
- archive-{custom_post_type}.php not getting recognized wordpress
- Archive.php is not displaying tags
- Custom post type category page not working
- Custom Post Types Archives and daily/monthly joke
- paging is not working properly on news archives page [duplicate]
- Categories in custom post types
- Display results from two Custom Post Types in page template
- How to make a list of posts displaying them 5 by 5 with a “next posts” link?
- is_singular won’t call my functions?
- Query Custom Post Type and sort by year
- Custom post types not using archive structure
- How to turn custom-post archive into an overview page, listing the metadata of the posts?
- Pagination not working for archive
- Remove plugin’s custom post type archive page and single pages [closed]
- WP Query + custom fields: How to query event posts from the current date backwards 6 months and organize it month by month?
- WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query