Last active
December 20, 2015 06:19
-
-
Save jaredatch/6085445 to your computer and use it in GitHub Desktop.
Remove extra metaboxes when editing the "Home" page
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
<?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