Skip to content

Instantly share code, notes, and snippets.

@blobaugh
Created September 29, 2015 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blobaugh/d09c630387078121e590 to your computer and use it in GitHub Desktop.
Save blobaugh/d09c630387078121e590 to your computer and use it in GitHub Desktop.
<?php
add_action( 'do_meta_boxes', function() {
global $pagenow;
if( 'edit.php' != $pagenow ) {
// Only show on edit.php page
return;
}
if( ***HOME_PAGE_POST_ID*** != $_GET['post'] ) {
// Only run on the home page!
return;
}
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
}, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment