I’d like to be able to have categories of a custom post type, how do you set this up?
update
I want to keep the default categories for regular blog posts, but a separate set of categories just CPT.
I’d like to be able to have categories of a custom post type, how do you set this up?
update
I want to keep the default categories for regular blog posts, but a separate set of categories just CPT.
You must be logged in to post a comment.
You need to add
'taxonomies' => array('category')
in yourregister_post_type()
function.register_post_type()
register_taxonomy()
register_taxonomy_for_object_type()
You have to register a taxonomy using register_taxonomy or register_taxonomy_for_object_type. The you can use wp_insert_term to insert values for that taxonomy.