I’d love to know the answer to this too. Do we need to actually create DIFFERENT taxonomies, one for each post-type, like “subject-tutorials” and “subject-articles” (and the Label for each can be “Subject”). We would want the same Terms in each Taxonomy, but we’d have to manage that manually.. they would not actually be connected in the database at all. Right?
I think we actually can SHARE TAXONOMIES among different custom content types. When we register a Taxonomy, we specify a single content type. But when we register a Custom Content Type, we can specify various Taxonomies that it uses (http://codex.ww.wp.xz.cn/Function_Reference/register_post_type ).
I had been using a plugin to create my custom content type (Custom Post Type UI), so I didn’t realize there are more things we can specify by doing it manually in functions.php.
Now my custom taxonomy “Color” appears under both of my content types (Articles, Reports). And the Count for each term includes both content types.
Thanks to Chris Coyier & Jeff Starr of Digging into WordPress (http://digwp.com/2010/05/guide-new-features-wordpress-3/) for pointing me in the right direction.
Great – thank you very much. Hopefully this is something that will be supported with the Custom Post Type UI plugin soon, but for now I will work on the beta version using the functions.php and coding myself.
You can also register a taxonomy to multiple post types with something like this where genre is registered to book, post, and page:
register_taxonomy('genre',array('book','post','page'), array(
'hierarchical' => true,
'labels' => $labels,
'show_ui' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'genre' ),
));
Thanks MichaelH – that is a help also.
Thanks everyone – this was exactly what I was looking for.
~Kyle~
my taxanomies doesnt show up in custom post list. any idea?
nvmnd. get it done already.
How about sharing Tags with the default post-type? I included tags in my custom taxonomies for a new post-type but it seems to be independent from the default tags.
Could it be shared also?
@decio
try add this to your registered taxonomy.
'taxonomies' => array('category','post_tag')
it will use default category and tags taxonomies.
@od3n
Tks! After i read this article by Otto: http://ottopress.com/2010/wordpress-3-0-and-custom-post-types/
I decided custom post-type isn´t for me.
$args = array(
‘labels’ => $labels,
‘singular_label’ => __(‘Video’),
‘public’ => true,
// … all of the others…
‘taxonomies’ => array( ‘category’,’post_tag’) // add standard post categories and post tags
);
register_post_type( ‘videos’ , $args );
}