Skip to content

Instantly share code, notes, and snippets.

@DevinWalker
Created May 14, 2014 20:32
Show Gist options
  • Save DevinWalker/ee9d4e53883460c6bbb8 to your computer and use it in GitHub Desktop.
Save DevinWalker/ee9d4e53883460c6bbb8 to your computer and use it in GitHub Desktop.
This code removed the Revolution Slider metabox on pages, posts and CTPs
/**
* Remove Rev Slider Metabox
*/
if ( is_admin() ) {
function remove_revolution_slider_meta_boxes() {
remove_meta_box( 'mymetabox_revslider_0', 'page', 'normal' );
remove_meta_box( 'mymetabox_revslider_0', 'post', 'normal' );
remove_meta_box( 'mymetabox_revslider_0', 'YOUR_CUSTOM_POST_TYPE', 'normal' );
}
add_action( 'do_meta_boxes', 'remove_revolution_slider_meta_boxes' );
}
@suhakaralar
Copy link

function remove_revolution_slider_meta_box() {
$contexts = array( 'normal', 'advanced', 'side' );
foreach ( $contexts as $context ) {
$result = remove_meta_box( 'slider_revolution_metabox', null, $context );
error_log( 'Removing metabox from context: ' . $context . ' Result: ' . ( $result ? 'Success' : 'Failed' ) );
}
}

add_action( 'add_meta_boxes', 'remove_revolution_slider_meta_box', 99 );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment