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.

Another question. I have a custom post type called "Articles" Within that I have registered some taxonomies using register_taxonomy called "Article Topics" So my client would pop over to Articles, put in a new article, fill out the publisher, and link to where its published, choose the topic its about...all good.

Except: How do i get those "topics" to display in the sidebar. How do i make a sub-nav out of registered taxonomies? Something like this:

<?php wp_list_categories($args); ?> 

Is this even a good idea? Or should I just say to hell with it, and go back to categories, and ditch the custom post type?

Thanks.

Nadine

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Have a look at the codex page for wp_list_categories.

$args = array( 'taxonomy' => 'article_topics' );
wp_list_categories( $args );

For the taxonomy terms assigned to individual posts, get_categories also accepts a taxonomy argument.

share|improve this answer
    
Oh cool! This is my first time using custom post types, so I had no idea that call was tied to them. Now I know. Sorry for the noob question. But thanks. :) –  Nadine Sep 9 '11 at 23:47
    
...any chance that also works with the likes of the_category() within the loop or something similar? ...ie: showing the topics covered in that article. Codex says no, currently hunting around. –  Nadine Sep 10 '11 at 0:00
    
get_the_term_list: echo get_the_term_list( $post->ID, 'article_topics', '', ', ', '' ); –  Milo Sep 10 '11 at 0:05
    
Thank You. Appreciate the responses. :) –  Nadine Sep 10 '11 at 0:19
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.