Disable Default Categories and Tags Taxonomies
Unregisters the built-in Categories and Tags taxonomies from Posts for sites that use custom taxonomies exclusively.
PHPby SnipCraft
php
<?php
add_action( 'init', 'scseed_disable_default_taxonomies', 100 );
if ( ! function_exists( 'scseed_disable_default_taxonomies' ) ) {
function scseed_disable_default_taxonomies() {
// Unregister from Posts; other post types are unaffected.
unregister_taxonomy_for_object_type( 'category', 'post' );
unregister_taxonomy_for_object_type( 'post_tag', 'post' );
}
}
// Remove taxonomy meta boxes from the post editor.
add_action( 'admin_menu', 'scseed_remove_taxonomy_meta_boxes' );
if ( ! function_exists( 'scseed_remove_taxonomy_meta_boxes' ) ) {
function scseed_remove_taxonomy_meta_boxes() {
remove_meta_box( 'categorydiv', 'post', 'side' );
remove_meta_box( 'tagsdiv-post_tag', 'post', 'side' );
}
}#categories#cleanup#tags#taxonomy