Slider Revolution WP
09.27.2016
Thanks to William Bijker for providing this solution to us!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
function tp_remove_metabox_from_all_post_types() { if( is_admin() && current_user_can('manage_options') ) { $args = array( 'public' => true, ); $output = 'names'; // names or objects, note names is the default $operator = 'and'; // 'and' or 'or' $post_types = get_post_types( $args, $output, $operator ); foreach ( $post_types as $post_type ) { remove_meta_box('eg-meta-box', $post_type, 'normal'); remove_meta_box('mymetabox_revslider_0', $post_type, 'normal'); } } } add_action('add_meta_boxes', 'tp_remove_metabox_from_all_post_types', 999); |