Remove Scripts Meta Box From Genesis

The following screenshot shows the Scripts meta box which is located on all Edit Post & Edit Page screens in Genesis:

The code in this tutorial, once added to the end of your child themes functions file, removes the box. It also removes the setting from the Screen Options drop down menu:

This code removes the scripts box from all Edit Page screens in Genesis.

add_action( 'admin_menu' , 'remove_genesis_page_scripts_box' );
function remove_genesis_page_scripts_box() {
remove_meta_box( 'genesis_inpost_scripts_box', 'page', 'normal' ); 
}

The following code removes the scripts box from Edit Post screens only:

add_action( 'admin_menu' , 'remove_genesis_post_scripts_box' );
function remove_genesis_post_scripts_box() {
remove_meta_box( 'genesis_inpost_scripts_box', 'post', 'normal' ); 
}

The following code removes the scripts box from Edit Page & Post screens:

add_action( 'admin_menu' , 'remove_genesis_page_post_scripts_box' );
function remove_genesis_page_post_scripts_box() {

$types = array( 'post','page' );

remove_meta_box( 'genesis_inpost_scripts_box', $types, 'normal' ); 
}

All code uses the WordPress remove_meta_box function.

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.