Remove Genesis Theme Settings Metaboxes

Often when developing a custom Genesis theme some of the meta boxes on the Genesis Theme Settings page will become redundant.

The following code will remove all of the Genesis settings meta boxes, so delete or comment out as appropriate.

<?php
/**
* Remove redundant Genesis meta boxes.
*
* @param string $pagehook Page hook for the Theme Settings page.
*
* @since 1.1.0
*/
add_action( 'genesis_theme_settings_metaboxes', function ( $pagehook ) {
remove_meta_box( 'genesis-theme-settings-version', $pagehook, 'main' );
remove_meta_box( 'genesis-theme-settings-style-selector', $pagehook, 'main' );
remove_meta_box( 'genesis-theme-settings-feeds', $pagehook, 'main' );
remove_meta_box( 'genesis-theme-settings-adsense', $pagehook, 'main' );
remove_meta_box( 'genesis-theme-settings-layout', $pagehook, 'main' );
remove_meta_box( 'genesis-theme-settings-header', $pagehook, 'main' );
remove_meta_box( 'genesis-theme-settings-nav', $pagehook, 'main' );
remove_meta_box( 'genesis-theme-settings-breadcrumb', $pagehook, 'main' );
remove_meta_box( 'genesis-theme-settings-comments', $pagehook, 'main' );
remove_meta_box( 'genesis-theme-settings-posts', $pagehook, 'main' );
remove_meta_box( 'genesis-theme-settings-blogpage', $pagehook, 'main' );
remove_meta_box( 'genesis-theme-settings-scripts', $pagehook, 'main' );
} );
view raw functions.php hosted with ❤ by GitHub

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *