Last active
January 15, 2024 16:02
-
-
Save joshuafredrickson/9a6b9f57819c16cfccde259fd7a36286 to your computer and use it in GitHub Desktop.
WordPress: Remove Slider Revolution metabox from certain post types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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