Created
May 29, 2013 09:57
-
-
Save alexpos/5669235 to your computer and use it in GitHub Desktop.
Remove meta-boxes
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
function cbqc_remove_boxes() { | |
// Remove boxes I don’t like | |
// *** For posts *** // | |
// Custom Fields | |
remove_meta_box( ‘postcustom’ , ‘post’ , ‘normal’ ); | |
// Excerpt | |
remove_meta_box( ‘postexcerpt’ , ‘post’ , ‘normal’ ); | |
// Trackbacks | |
remove_meta_box( ‘trackbacksdiv’ , ‘post’ , ‘normal’ ); | |
// Discussion | |
remove_meta_box( ‘commentstatusdiv’ , ‘post’ , ‘normal’ ); | |
// Revisions | |
remove_meta_box( ‘revisionsdiv’ , ‘post’ , ‘normal’ ); | |
// Author | |
remove_meta_box( ‘authordiv’ , ‘post’ , ‘normal’ ); | |
// Categories | |
remove_meta_box( ‘categorydiv’ , ‘post’ , ‘normal’ ); | |
// Tags | |
remove_meta_box( ‘tagsdiv-post_tag’ , ‘post’ , ‘normal’ ); | |
// Publish | |
remove_meta_box( ‘submitdiv’ , ‘post’ , ‘normal’ ); | |
// *** For pages *** // | |
// Custom Fields | |
remove_meta_box( ‘postcustom’ , ‘page’ , ‘normal’ ); | |
// Discussion | |
remove_meta_box( ‘commentsdiv’ , ‘page’ , ‘normal’ ); | |
// Comments | |
remove_meta_box( ‘commentstatusdiv’ , ‘page’ , ‘normal’ ); | |
// Revisions | |
remove_meta_box( ‘revisionsdiv’ , ‘page’ , ‘normal’ ); | |
// Author | |
remove_meta_box( ‘authordiv’ , ‘page’ , ‘normal’ ); | |
// Page Attributes | |
remove_meta_box( ‘pageparentdiv’ , ‘page’ , ‘normal’ ); | |
// Publish | |
remove_meta_box( ‘submitdiv’ , ‘page’ , ‘normal’ ); | |
} | |
add_action(‘admin_init’, ‘cbqc_remove_boxes’); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment