Skip to content

Instantly share code, notes, and snippets.

@jaredatch
Last active December 20, 2015 06:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaredatch/6085445 to your computer and use it in GitHub Desktop.
Save jaredatch/6085445 to your computer and use it in GitHub Desktop.
Remove extra metaboxes when editing the "Home" page
<?php
/**
* Remove metaboxes we don't need when editing the "Home" page
*
* @since 1.0.0
*/
function ja_home_remove_metaboxes() {
// Replace 1206 with home post ID
if ( isset( $_GET['post'] ) && $_GET['post'] == '1206' ) {
remove_meta_box( 'genesis_inpost_seo_box', 'page', 'normal');
remove_meta_box( 'genesis_inpost_layout_box', 'page', 'normal');
remove_meta_box( 'genesis_inpost_scripts_box', 'page', 'normal');
remove_meta_box( 'pageparentdiv', 'page', 'normal');
}
}
add_action( 'admin_menu', 'ja_home_remove_metaboxes', 50 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment