Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have just created a custom post type (portfolio) for a wordpress website. I also have added a Custom Taxonomy called (portfoliocategory).

I have created a archive page for my Custom Post Type (archive-portfolio) which is working properly, but I need help with Custom Taxonomy Template, I have created taxonomy-portfoliocategory.php but it is showing the default archive page and not showing the taxonomy page template!!

share|improve this question
    
More information needed, e.g. URLs template code, the filename of your archive pages template that is showing, the difference between the two, etc –  Tom J Nowell Sep 21 '12 at 23:26
    
also your taxonomy registration code would be useful –  Tom J Nowell Sep 21 '12 at 23:33
    
Okay, I have created a custom post type which you can see here: creativekhan.com/portfolio It is working properly with archive-portfolio.php template. Now I have created a custom taxonomy for the "portfolio" custom post type. which you can see here: creativekhan.com/portfolio/category/psd-design The custom taxonomy name is "portfoliocategory" I have also created "taxonomy-portfoliocategory.php" file but it still show the default archive/category page? –  Shah Hussain Sep 21 '12 at 23:55
add comment

1 Answer

up vote 1 down vote accepted

In the absence of further information this diagram should explain the template heirarchy system:

enter image description here

click for bigger

Thus if we have a term 'example' then example.com/portfoliocategory/example will show portfolio posts using the template template-portfoliocategory.php and if that isn't found it willl use taxonomy.php and then archive.php and finally index.php

share|improve this answer
    
I have change the taxnomoy default slug to "portfolio/category" creativekhan.com/portfolio/category/website-design –  Shah Hussain Sep 22 '12 at 0:00
    
Here is my custom post type registration code: pastebin.com/PB7YRBXR –  Shah Hussain Sep 22 '12 at 0:01
    
ah that explains a lot!n You now have an invalid slug! Instead use the rewrite option to change the URL –  Tom J Nowell Sep 22 '12 at 18:15
    
Thanks alot, Its done! Thanks for the great help! –  Shah Hussain Sep 22 '12 at 22:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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