because of my taxonomy hierarchy, my taxonomy-type.php template is already used, is there a way to have only one taxonomy-type-term.php template ?
I've got 13 sub terms, do I need to create 13 taxonomy-type-[term].php templates ?
Thanks.
Cyril
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Sign up to join this communitybecause of my taxonomy hierarchy, my taxonomy-type.php template is already used, is there a way to have only one taxonomy-type-term.php template ?
I've got 13 sub terms, do I need to create 13 taxonomy-type-[term].php templates ?
Thanks.
Cyril
Simply use taxonomy-{taxonomy}.php
.
Refer to the Template Hierarchy Codex entry regarding taxonomies.
WordPress will look for taxonomy template files in the following order:
taxonomy-{taxonomy}-{term}.php
- If the taxonomy were sometax
, and taxonomy's slug were someterm
WordPress would look for taxonomy-sometax-someterm.php
.taxonomy-{taxonomy}.php
- If the taxonomy were sometax
, WordPress would look for taxonomy-sometax.php
taxonomy.php
archive.php
index.php
EDIT
If you're already using taxonomy-{taxonomy}.php
for something other than the index archive for {taxonomy}
, perhaps you should re-consider your current use of this template file?
taxonomy-{taxonomy}.php
in use as, already, if not as the generic index archive template for {taxonomy}
?
Jun 27, 2011 at 17:01