Skip to content

Instantly share code, notes, and snippets.

@dgoze
Created July 24, 2024 18:06
Show Gist options
  • Save dgoze/da080b882ef9c79c08d328c3eb36386b to your computer and use it in GitHub Desktop.
Save dgoze/da080b882ef9c79c08d328c3eb36386b to your computer and use it in GitHub Desktop.
Remove Custom Taxonomy Metabox from WP Sidebar #wordpress #cptui
<?php
// example custom post type is "event"
// example custom taxonomy is "events-category"
function remove_default_event_category_metabox() {
remove_meta_box( 'tagsdiv-events-category', 'event', 'side' );
}
add_action( 'admin_menu' , 'remove_default_event_category_metabox' );
//'tagsdiv-{taxonomyname}' - Custom tag taxonomies metabox
//'{taxonomyname}div' - used for hierarchical taxonomies metabox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment