Created
December 17, 2021 19:37
-
-
Save markbosky/e583b83d7ac5c232aa422a27ee24bfe8 to your computer and use it in GitHub Desktop.
WordPress - Remove Unwanted Meta Boxes from Editor
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 | |
| // Remove Post Meta Boxes from WP Editor | |
| function remove_my_post_metaboxes() { | |
| remove_meta_box( ‘authordiv’,’post’,’normal’ ); // Author Metabox | |
| remove_meta_box( ‘commentstatusdiv’,’post’,’normal’ ); // Comments Status Metabox | |
| remove_meta_box( ‘commentsdiv’,’post’,’normal’ ); // Comments Metabox | |
| remove_meta_box( ‘postcustom’,’post’,’normal’ ); // Custom Fields Metabox | |
| remove_meta_box( ‘postexcerpt’,’post’,’normal’ ); // Excerpt Metabox | |
| remove_meta_box( ‘revisionsdiv’,’post’,’normal’ ); // Revisions Metabox | |
| remove_meta_box( ‘slugdiv’,’post’,’normal’ ); // Slug Metabox | |
| remove_meta_box( ‘trackbacksdiv’,’post’,’normal’ ); // Trackback Metabox | |
| } | |
| add_action(‘admin_menu’,’remove_my_post_metaboxes’); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment