Created
March 19, 2013 14:28
-
-
Save matthacksteiner/5196573 to your computer and use it in GitHub Desktop.
Hide Meta Boxes for non-admin
#wordpress #backend #functions.php
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
// Hide Admin Meta Boxes | |
add_action( 'admin_menu', 'remove_meta_boxes' ); | |
function remove_meta_boxes() { | |
// remove_meta_box( 'submitdiv', 'post', 'normal' ); // Publish meta box | |
remove_meta_box( 'commentsdiv', 'post', 'normal' ); // Comments meta box | |
remove_meta_box( 'revisionsdiv', 'post', 'normal' ); // Revisions meta box | |
remove_meta_box( 'authordiv', 'post', 'normal' ); // Author meta box | |
remove_meta_box( 'slugdiv', 'post', 'normal' ); // Slug meta box | |
remove_meta_box( 'tagsdiv-post_tag', 'post', 'side' ); // Post tags meta box | |
// remove_meta_box( 'categorydiv', 'post', 'side' ); // Category meta box | |
remove_meta_box( 'postexcerpt', 'post', 'normal' ); // Excerpt meta box | |
// remove_meta_box( 'formatdiv', 'post', 'normal' ); // Post format meta box | |
remove_meta_box( 'trackbacksdiv', 'post', 'normal' ); // Trackbacks meta box | |
remove_meta_box( 'postcustom', 'post', 'normal' ); // Custom fields meta box | |
remove_meta_box( 'commentstatusdiv', 'post', 'normal' ); // Comment status meta box | |
// remove_meta_box( 'postimagediv', 'post', 'side' ); // Featured image meta box | |
// remove_meta_box( 'pageparentdiv', 'page', 'side' ); // Page attributes meta box | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment