Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Add Already Registered Custom Taxonomy To Custom Post Type
add_action('init','add_categories_to_cpt', 200);
function add_categories_to_cpt(){
register_taxonomy_for_object_type('search_tags', 'post_type');

This comment has been minimized.

Copy link
Owner Author

abrudtkuhl commented Aug 8, 2014

If you have already defined your custom taxonomy in another plugin and want to use it in a custom post type that you might register in a second plugin, you'll need to add this in your custom post type definition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.