Custom Taxonomy Archives

I show you how to create custom taxonomies in Chapter 12. If you'd like a preview, you can download the Taxes plugin ( that creates a "people" taxonomy for tagging your friends and family in your posts and photos.

Once you have created custom taxonomies, you have several options for displaying them. WordPress will first look for a taxonomy-taxonomy-term.php file. To use Taxes as an example, the taxonomy is "people" and the slug for Andy's tag might be "andy". WordPress would look for taxonomy-people-andy.php. If an archive for Andy doesn't exist, WordPress will look for a generic "people" archive, taxonomy-people.php. If that doesn't exist, it will try taxonomy.php, then archive.php, and finally index.php.

0 0

Post a comment