Created
July 24, 2024 18:06
-
-
Save dgoze/da080b882ef9c79c08d328c3eb36386b to your computer and use it in GitHub Desktop.
Remove Custom Taxonomy Metabox from WP Sidebar #wordpress #cptui
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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