Remove Taxonomy Metaboxes from Post Type Sidebar

I’m a fan of clean WordPress dashboards for my client. Occasionally you will use a theme or plugin that adds custom post types and taxonomies to your site. However, there may be taxonomies you just don’t need. Here’s a way to hide them from the backend without modifying core files. Add this code to your functions.php file or a custom plugin.

* Remove Taxonomy Metaboxes from Post Type Sidebar
function tft_remove_taxonomy_metabox() {

// use 'taxonomy-div', 'post-type' to target the proper taxonomy.
// 'side' is for sidebar location; 'normal' is for main location under wysiwyg
remove_meta_box('testimonial_authordiv', 'testimonials', 'side');
remove_meta_box('testimonial_categorydiv', 'testimonials', 'side');
remove_meta_box('testimonial_imagediv', 'testimonials', 'side');

add_action( 'admin_menu', 'tft_remove_taxonomy_metabox', 20);

Leave a Reply

Your email address will not be published. Required fields are marked *

Name *