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
- Taxonomy term archive claims there are no posts, but there are. How to resolve?
- Custom Taxonomy archive with url parameters
- Number of Custom Post Types published are not being shown in the custom page
- How do I display the taxonomy for a custom post type in an array
- Custom post type archive page blank
- How to conditionally redirect to the post from a taxonomy page?
- How do I display the grand child items of a taxonomy term?
- Taxonomies relations
- Is it better to use WordPress Custom Post Types or Taxonomies?
- Full Custom Post Type List Organised by two Taxonomies
- WordPress Doesn’t Generate Taxonomy Archive
- Suggested Post and Taxonomy structure
- How to display custom post in archive section of the wordpress page?
- Custom post with more than one custom taxonomy
- Get the taxonomy of a post hierarchically
- Adding custom taxonomy in same menu place with two custom post types
- How to make custom taxonomy into drop down select in a custom metabox
- posttype/taxonomy/term archive page 404 error
- How to get list of taxonomy slugs ordered parents>childs?
- Custom post type / taxonomy rewrite archive page 2 gives 404
- How do I share categories across multiple post types?
- Multiple tag cloud filtering
- Get url.com/post_type/taxonomy/term work!
- How to display products name in a non-alphabetical order, in a custom field (taxonomy)?
- Taxonomy in URL
- How can I get this request to use the Custom Post Type page template instead?
- Different Category system needed for the Custom Post Type
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- Archive for a Taxonomy of a Custom Post type
- Custom Post Archive is not working
- How to Set Taxonomy Object Description?
- Custom select query for taxonomies that have posts categorized in another taxonomy
- Custom Taxonomy Is Being Pulled into a Page, But It Doesn’t Have A Hyperlink
- Querying two taxonomies with tax_query not woking
- Rename a slug label
- Custom Post type & Taxonomy 404
- Hide specific taxonomies from a taxonomy list using ‘get_object_taxonomies’
- How can I use archive-{post_type}.php theme template?
- Custom taxonomy (categories) on custom post type return no results
- Taxonomy archive 404ing (not term archive)
- Variable not working in WP_Query
- Hide meta box for everything BUT a certain custom post type
- Return the name of the post type
- get_category_link() for custom post type does not include custom slug rewrite?
- Targeting categories in custom fields
- How can I create an automatic drop down menu with my tags?
- How to define a term for custom taxonomy
- Custom taxonomy or custom page templates?
- List custom taxonomy as navigation – taxonomy pages with all it’s posts?
- Dynamically insert an article at the top of a taxonomy archive – or?
- Custom Post Types not queried in Custom Taxonomy archives or Native archives
- Custom Permalinks For CPT and pages with parent. Advanced WordPress
- Permalink problems with custom post type and custom taxonomy
- Get taxonomy singular name instead of taxonomy slug inside $taxonomy query
- sort CPT on Custom Taxonomy Archive page
- Only show posts with a specific term of an associated taxonomy in a custom post type archive
- Show Taxonomies with admin area for custom post type?
- Custom taxonomy template list not working (404)
- Rewrite custom post type with taxonomy
- How to rewrite custom taxonomy term archive to use THE SAME SLUG/front as CPT
- WordPress multisite – is it possible to have different taxonomies for each site?
- My custom taxonomy is only displaying 1 of 3 terms
- Custom Post type date archive for custom taxonomy
- Query custom post types & Taxonomies and list them in a table on a page
- Show categories of custom post type and not all posts
- Taxonomy template page not working
- How to show list of taxonomy terms associated with specific post?
- Changing CPT slug and taxonomy already registered in parent theme
- How to constrain the results to a specific post_type on tag archive page?
- Get the link of the first post of a custom taxonomy in a custom taxonomy list
- Creating custom post type posts and associating them with a post from another custom post type
- I have custom post type with custom taxonomy. But not found the taxonomy page..
- Group Custom post type in a taxonomy page by its child taxomony
- Copy/Move selected taxonomy terms to another taxonomy for posts
- Query Posts that have Custom Taxonomy
- Custom Taxonomy Terms in Menu lead to which page?
- Getting List of child terms from custom taxonomy parent
- Get posts by category name
- Custom Post Type Custom Archive Page Not Working
- Getting custom taxonomy posts on archive page
- Custom taxonomy query showing more than 4 posts
- Using page title as a link to term archive
- Custom Post taxonomy template
- Query Multiple Custom Post Types & Exclude a Taxonomy Term
- Custom post type category permalinks and archive pages
- How to display posttypes and taxonomy in standard posts, not in a separate label?
- Query Custom Post Type by Taxonomy
- How to have multiple archive pages?