Hot answers tagged customization
Alternatively to Kaiser's answer, when you register the post type, simply use the taxonomies attribute: register_post_type( 'my-cpt', array( ... 'taxonomies' => array( 'category' ), ... ) ); Details on register_post_type() can be found here in Codex.
Additional info for @StephenHarris answer: When you register a taxonomy and a post type and want to connect them, there's one important rule: Always register the taxonomy first. Then register the post type. The reason is simple: Take a look at the source of register_taxonomy(): // Adds the 2nd argument ($object_type) to the arguments: ...
When your taxonomy is already registered (or is a built-in one like post tags, categories, etc.), you can simply glue it to a post type by using register_taxonomy_for_object_type(): register_taxonomy_for_object_type( 'category', 'course' ); Just make sure you do that after both the taxonomy and the post type are already registered.
Only top voted, non community-wiki answers of a minimum length are eligible