You can create taxonomy-cat-cpt.php
, and inside it just use:
<?php get_template_part( 'archive-cpt' ); ?>
Then they’ll both use the same template.
Then inside archive-cpt.php
, if you use the_archive_title()
archive the_archive_description()
it will display the appropriate title and description automatically based on whether you’re viewing the taxonomy or post type archive.
Regarding posts, as long as you’re using the main query (so just have_posts()
and the_post()
and no new WP_Query()
nonsense), then the appropriate posts should be listed, as long as you’re using the correct links.
For anything else that needs to be different, you can check is_tax( 'cat-cpt' )
or is_post_type_archive( 'cpt' )
to conditionally hide or show elements for each one.
Related Posts:
- How to create archive page for taxonomy terms within custom post type
- How to list custom post types?
- Create template for taxonomy results limited by Custom Post Type
- How do I check if the user is on a taxonomy term parent, child or grandchild page?
- What’s the name of the custom post type yearly archive template?
- Alphabetically sort a taxonomy.php template by post title
- Archive page for custom post type and custom taxonomy
- How can I set up the URL for a category archive for a custom post type?
- Taxonomy Query of Custom Post Displays Archive Instead of Posts
- How to have a dynamic slug and rendering the archive-{post_type}.php?
- Show custom category archive as front page and remove taxonomy slug from urls
- Custom Taxonomy as checkbox or dropdown
- Taxonomy: Why ‘with_front’ => false DOES NOT WORK?
- Custom Taxonomy as Dropdown in admin
- Create permalink structure for one taxonomy archive per custom post type
- Page is defaulting to archive page and not designated template
- Retrieve single term slug
- Better to use a post type archive, page template, or shortcode for generating a highly configurable CPT archive?
- Query multiple taxonomy in Custom Post Type
- Archive page for taxonomy of custom post type
- Custom Post Type: How to display all of same taxonomy?
- Disable single pages and archives and keep preview
- Remove “-2” from a Toolset Types URL with the same post name
- Create Custom Post Type Archive Page with Sub Categories Navigation Sidebar
- Use the_taxonomies() to create a simple list
- Listing taxonomies from custom post type
- Custom Post Type and Taxonomy combination
- Custom post type archive page pagination
- Second Custom Post Type Archive
- How to check the terms in single custom post type template
- is_main_query() not working for WP REST API
- How can I move a custom taxonomy and its data from one post type to another?
- Archive page for taxonomy terms
- Custom post type templating problem
- Custom Taxonomies not appearing in Admin
- Limit amount of posts made within a custom taxonomy
- Issue on Creating Custom Tax Term Dynamically From Another CPT Meta-box On Publish
- list taxonomies from a custom post type
- Custom post type archive page blank
- Taxonomies relations
- WordPress Doesn’t Generate Taxonomy Archive
- Adding custom taxonomy in same menu place with two custom post types
- Rename a slug label
- Custom Post type & Taxonomy 404
- Custom taxonomy (categories) on custom post type return no results
- Dynamically insert an article at the top of a taxonomy archive – or?
- Custom Permalinks For CPT and pages with parent. Advanced WordPress
- Rewrite custom post type with taxonomy
- My custom taxonomy is only displaying 1 of 3 terms
- Show categories of custom post type and not all posts
- Query Posts that have Custom Taxonomy
- Custom Taxonomy Terms in Menu lead to which page?
- Using page title as a link to term archive
- How to display posttypes and taxonomy in standard posts, not in a separate label?
- How to have multiple archive pages?
- Create a Custom Path to Archive
- Advanced archive url structure (category, tag and date)
- WordPress sitemap with Custom Post Types
- “Menu order” being ignored when querying posts from a parent taxonomy with “include_children” set to true
- Archive page of CPT’s custom Taxonomy
- Getting Same Description in All the Custom Taxonomy Posts
- Get the taxonomy value in the post loop inside the archive page
- Custom post type archive URLs with a single taxonomy
- How to show related posts of category on post within custom posttype
- pagination problem listing custom post types of taxonomy in wordpress
- How to add CSS class field in Custom Taxonomy?
- WP_Query for custom taxonomies showing posts from non-specified terms?
- How to show custom post count in archive page
- Do not show child pages within a file page
- Archive for custom taxonomy
- Listing all custom posts having a specific taxonomy whatever the terms
- Custom taxonomy with custom post type archive page
- How to Use A Custom Post Type as Taxonomy for Another Custom Post Type
- How to manage a dynamic multi-level page hierearchy system?
- Display custom tax in “while” loop
- Categories manage
- Showing taxonomies with terms that are attached to custom post
- Custom Taxonomy page redirecting to 404 page
- Changing an item in drop down after 5 latest posts per taxonomy
- Custome post type “tags” pick default archive instead of custom post type archive
- Customize url from the_terms
- Want to display my custom date archive to date.php but dont know how
- Displaying WordPress posts from post and custom post type in custom taxonomy
- Custom post type taxonomy template and URL confusion
- Help with Multi Level Category Archive Page
- Custom Taxonomy is disabled on Edit page
- Override “Parent” input for custom taxonomy
- Pagination fault in custom post type archive page [duplicate]
- Connecting multiple post types? Or linking “News” posts with “Game” posts how?
- How to display custom post types AND regular posts separately on a shared taxonomy archive?
- Sort by Custom Post Type (Multiple Loop)
- Why is this custom post type defaulting to archive.php?
- How to display elements of different post types?
- How to display only taxonomies of custom post type in a page?
- Check if taxonomy is attached to at least one post in a post-type
- Looping taxonomy in taxonomy?
- Custom taxonomy archive page not routing?
- Custom posts and custom taxonomies for many products and categories?
- get_the_term_list() wanting to loop through the returned values
- How do i get the taxonomy term name on the CPT archive page?