• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

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.

Meta Box

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.