This is the order in which WordPress checks for your template files, taken directly from Development using Roots
Custom Taxonomies
- taxonomy-(taxomony)-(term).php (if doesn’t exist, falls back to…)
- taxonomy-(taxomony).php (if doesn’t exist, falls back to…)
-
taxonomy.php (if doesn’t exist, falls back to…)
4.* archive.php (if doesn’t exist, falls back to…)* - index.php
So, if you have a custom taxonomy called foo_categories
and one of your a custom categories is called bar
, its archive template file would need to be taxonomy-foo_categories-bar.php
. If you want all your custom Foo categories to use the same template you would just create one template file called taxonomy-foo_categories.php
.
Note that these should be in the root of the theme directory, NOT in the templates directory!