[wp-hackers] Adding built in taxonomies to custom post types

Mike Schinkel mikeschinkel at newclarity.net
Wed Jul 7 22:36:39 UTC 2010


register_taxonomy_for_post_type('category','glossary');
register_taxonomy_for_post_type('post_tag','glossary');

-Mike

Sent from my iPad

On Jul 7, 2010, at 6:06 PM, Jake Goldman <wphackers at jakemgold.myfastmail.com> wrote:

> Anybody here have any luck adding the built in taxonomies (post_tags, category) to a custom taxonomy?
> 
> Haven't dug in too deeply, but using the code below I haven't been able to get the "category" taxonomy added to this simple post type:
> 
> register_post_type('glossary',array(
>    'label' => 'Glossary',
>    'description' => 'The lingo',
>    'public' => true,
>    'capability_type' => 'page',
>    'supports' => array('title','editor'),
>    'menu_position' => 20,
>    'taxonomies' => array('category')
> ));
> 
> Note that I can add new and custom taxonomies (of any sort) without an issue.
> 
> Before I spend too much time digging, hoping someone else is aware of this / has run into this...
> 
> Jake
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list