As mentioned in register_post_type()
Codex page:
taxonomies
(array) (optional) An array of registered taxonomies likecategory
orpost_tag
that will be used with this post type. This can be used in lieu of callingregister_taxonomy_for_object_type()
directly. Custom taxonomies still need to be registered withregister_taxonomy()
.
Default: no taxonomies
In my Custom Post Type (product
) I'm also assigning two Custom Taxonomies with register_taxonomy()
apart from the register_post_type()
, and they are working fine. But there's a parameter in register_post_type()
called 'taxonomies'
where it's said to mention all the taxonomies in an array, but even without this I'm achieving what it's meant to:
'taxonomies' => array( 'product_categories', 'product_tags' ),
So, I wonder what's the purpose of this?