Skip to content

Instantly share code, notes, and snippets.

@jaredatch
Last active Dec 20, 2015
Embed
What would you like to do?
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