Opened 10 years ago
Closed 9 years ago
#35477 closed enhancement (wontfix)
archive-$post_type.php in get_taxonomy_template
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | Themes | Keywords: | close |
| Focuses: | template | Cc: |
Description
I have custom post type and archive. In archive-post_type.php I have template. But this CPT have a taxonomy. Template in taxonomy is identical to archive-post_type.php so I make taxonomy-taxonomy.php with content:
<?php get_template_part( 'archive', 'post_type' );
But I think that WordPress should load archive-post_type.php.
Attachments (1)
Change History (3)
#2
@
9 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
I'm going to close this as wontfix as I don't think core should be doing this by default - but that themes which are designed for it should by all means add a placeholder and include the template it wants to share.
Note: See
TracTickets for help on using
tickets.
archive-{$post_type}.phpis already used inget_archive_template()for post type archives. Using the same template inget_taxonomy_template()would lead to unintended effects.In
get_taxonomy_template(), the post type of every post can theoretically be different, so loading a template for a specific post type associated with the taxonomy is not possible.What you're currently doing should be fine and is not wrong.