Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Talk:Function Reference/register taxonomy for object type

The Example

I think the example needs changing. Firstly, the 'posts' post type is too close to the default post type 'post', which already has categories. Secondly, it's not obvious that the taxonomy 'post_tags' can't be added with the similar form 'tag'. I suggest the post type is changed to something like 'my-custom-type' and another line is added for adding post_tags. - Mikael Grön 08:14, 8 May 2014 (UTC)

I agree that the example might need editing, but my issue is with regard to pluralization. I've seen elsewhere that the general names of post types and taxonomies are usually plural, so if we retain the same entities in the example, perhaps the correct way to say it would be as follows: <?php register_taxonomy_for_object_type'categories''posts' ); ?>  - Migs Migallos (First comment, ever.) 04:09, 11 May 2014 (UTC)