add_action( 'init', 'add_product_cat_to_custom_post_type' ); function add_product_cat_to_custom_post_type() { register_taxonomy_for_object_type( 'product_cat', 'custom_post_type' ); }