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 created a custom taxonomy, "partners". I would like to categorize these items, so I created a custom post type with a taxonomy.

register_taxonomy("partners-category", array("partners"), array("hierarchical" => true, "label" => "Partners", "singular_label" => "Partner", "rewrite" => true, "slug" => 'partners-category'));

I would like to list these posts by categories for example: categoryname-category.php. I know it's working only with posts, so what's the best way?

Thank you very much and sorry, I'm newbie.

share|improve this question
    
This is a confusing question. I am not sure what is being asked. –  s_ha_dum Feb 23 '13 at 14:45
    
You can read the answer below that. I thought it's easy. –  Rinoleti Feb 23 '13 at 17:34
    
You start off by registering a new taxonomy and then ask about listing by category, which is a built-in taxonomy and different from the one you created. –  s_ha_dum Feb 23 '13 at 17:56
    
Nevermind, r1987 understood my question. –  Rinoleti Feb 24 '13 at 12:09

1 Answer 1

up vote 0 down vote accepted

You have to create an template file called taxonomy-{name}.php to show the posts assigned to a custom taxonomy. So in your case it should be taxonomy-partners-category.php . Category related archive pages work only with "Posts".

Info: http://codex.wordpress.org/Template_Hierarchy . Scroll down to Custom Taxonomies display.

share|improve this answer
    
Thank you very much! Btw in the future I need more help about wp, so if you available for work contact me at rinoleti.rodri at gmail.com. Thanks, sorry for the offtopic. –  Rinoleti Feb 23 '13 at 14:27
    
Could you also "tick" it as the right answer? –  r1987 Feb 23 '13 at 14:32
    
I did it, thank you again! –  Rinoleti Feb 23 '13 at 14:33

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.