I\'m creating different custom post types and taxonomies and I want to remove the \'Post Tags\' taxonomy from the default \'Posts\' post type. How do I go about doing this?
Where it says 'taxonomy_to_remove
' is where you'll enter the taxonomy you want to remove. For instance you can replace it with the existing, post_tag
or category
.
add_action( 'init', 'unregister_taxonomy');
function unregister_taxonomy(){
global $wp_taxonomies;
$taxonomy = 'taxonomy_to_remove';
if ( taxonomy_exists( $taxonomy))
unset( $wp_taxonomies[$taxonomy]);
}