This question might seem very simple, but I cannot find a proper answer for it. In my example I should have multiple pages that should display 'FAQ'. For that I have added custom taxonomy page_type to default page post type and set 'FAQ' as page_type for those pages. Now, according to documentation :

taxonomy-{taxonomy}-{term}.php - If the taxonomy were sometax, and taxonomy's term were someterm WordPress would look for taxonomy-sometax-someterm.php. In the case of Post Formats, the taxonomy is 'post_format' and the terms are 'post_format-{format}. i.e. taxonomy-post_format-post-format-link.php

In my case, I add taxonomy-page_type_faq.php template file, but wordpress keeps using the default page.php.

What am I doing wrong ?


The taxonomy-$taxonomy-$term.php template is a template for an archive, a listing. It's not a template for a post, be it a post of type page, or anything else. It overrides taxonomy-$taxonomy.php, then taxonomy.php, then archive.php followed by index.php

| improve this answer | |
  • Well, as I understood, I can't use it for single pages? – gegham-ayvazyan May 2 '15 at 18:47
  • You can give a page a custom taxonomy yes, but custom taxonomy templates are for showing taxonomy archives, aka listing posts and pages, not the page itself. E.g. tag archives, category archives, etc. If you're trying to re-implement post formats or page templates, taxonomies won't do that for you. You can use them to store and pick which template is used, but you then have to write the code that actually loads the template based off of that data – Tom J Nowell May 3 '15 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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