Last active
May 18, 2023 14:42
-
-
Save zackpyle/4314d1a3c1a86e1b4ad657688623986f to your computer and use it in GitHub Desktop.
Remove Custom Taxonomy Metabox from WP Sidebar #wordpress #cptui
This file contains 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