0

Hello All I was wondering if someone could help me out. I have created a custom post type along with a custom taxonomy. In this custom taxonomy I have created custom terms through the wp dashboard. I have added these terms to my Nav menu when I click on these terms in goes to a page. My question here is is that page the archive.php? How would I style that page how I want? Thanks

1

It's the template taxonomy.php, and some variants: http://codex.wordpress.org/Template_Hierarchy#Custom_Taxonomies_display

5
  • if i create a taxonmy-producttype.php (producttype) being my custom taxonomy. Will this apply to all terms under this taxonomy? or would I have to make a page for each term under the taxonomy? I would rather have it so if i decide to add more terms under this taxonomy it automatically formats them all the same for each term – steamfunk Feb 18 '15 at 23:45
  • It will apply to all terms of that taxonomy. You can specify additional templates for specific terms using the taxonomy-{taxonomy}-{term}.php template; e.g. all term pages could use taxonomy-cars.php, except for ones specified like taxonomy-cars-honda.php and taxonomy-cars-bmw.php. – Taruc Feb 19 '15 at 0:06
  • I have created a taxonomy-producttype.php But when I click on the terms in the nav menu it does not go to the taxonomy-producttype.php any idea why? – steamfunk Feb 19 '15 at 0:59
  • It's a little hard to day w/o seeing anything. got any code? – Taruc Feb 19 '15 at 16:34
  • I did it, i forgot to go into the permalinks and re save it in order for the template to recognize thanks for your help. – steamfunk Feb 19 '15 at 16:50
0

The page for any particular term should definitely be an archive page.

Check the Template Hierarchy and you will see that wordpress looks for the following templates to display terms

  • taxonomy-(taxonomy)-(term).php
  • taxonomy-(taxonomy).php
  • taxonomy.php
  • archive.php
  • paged.php (maybe)
  • index.php

So if you want to create a custom layout, copy your archive.php (if it exists) and give it the name taxonomy-(your_taxonomy_name).php and then have at it and that should only apply to terms for your custom taxonomy.

2
  • Thank you Tarackus and Privateer for your responses I think you both are saying the same thing. @Privateer if i create taxonomy-(customTaxonomy).php will this layout apply to all my terms. – steamfunk Feb 18 '15 at 23:41
  • Yes. as long as (customTaxonomy) in your statement is the name of your custom taxonomy. – Privateer Feb 18 '15 at 23:50

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.