Skip to content

Instantly share code, notes, and snippets.

@joshuafredrickson
Last active January 15, 2024 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshuafredrickson/9a6b9f57819c16cfccde259fd7a36286 to your computer and use it in GitHub Desktop.
Save joshuafredrickson/9a6b9f57819c16cfccde259fd7a36286 to your computer and use it in GitHub Desktop.
WordPress: Remove Slider Revolution metabox from certain post types
<?php
/**
* Remove Slider Revolution metabox from certain post types.
* This includes removing it from the top of ACF field groups.
*/
add_action('do_meta_boxes', function (): void {
if (!is_admin()) {
return;
}
$post_types = ['acf-field-group', 'page', 'post', 'your-custom-post-type',];
foreach ($post_types as $post_type) {
remove_meta_box('slider_revolution_metabox', $post_type, 'side');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment