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.

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.