2

I am trying to have some information specific to a taxonomy term appear above that taxonomy's archive list.

Example: Taxonomy is 'Sports', with football, soccer, and baseball being terms within the 'Sports' taxonomy. I would like to have a small description of each sport display above that term's archive page.

In researching this possibility, I have read the Category Templates page, found a plugin that appears to do what I want, but only with regard to Categories and not custom taxonomies.

I would do it with Categories, but I have multiple taxonomies now and cannot use the simple categories solution any longer :(

Am I being dense, or are custom taxonomy templates not possible?

1 Answer 1

9

Custom Taxonomy templates are entirely possible, the order of the template loading is,

  1. taxonomy-{sometax}-{someterm}.php - If the taxonomy were sometax, and taxonomy's slug were someterm
  2. taxonomy-{sometax}.php - If the taxonomy were sometax.
  3. taxonomy.php
  4. archive.php
  5. index.php

This template hierarchy give you tons of control on how you want to alter the display of taxonomies as a whole, as a group or alone. http://codex.wordpress.org/Template_Hierarchy

For example in your case you can create a template called taxonomy-sports.php and then customize it however you want using conditionals, template tags and functions.

1
  • That worked perfectly, Thank you! (edit: for the record, it was necessary to use the taxonomy-sports-soccer.php style of naming)
    – Stephen S.
    Aug 12, 2011 at 20:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.