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

WP SITES

2665

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

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

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems