Hi Kevin – thanks for that!
But I’d prefer not to use a plugin for various reasons – so eventually got it working by adding this to functions.php:
if (is_admin()) :
function my_remove_meta_boxes() {
remove_meta_box('rs_private_post_reader', 'post', 'advanced');
remove_meta_box('rs_post_contributor', 'post', 'advanced');
remove_meta_box('rs_post_editor', 'post', 'advanced');
[...]
}
add_action( 'add_meta_boxes', 'my_remove_meta_boxes' );
endif;
This works great except on one of my CPTs. In this case the contents of the boxes are replaced with “Warning: call_user_func() expects parameter 1 to be a valid callback, no array or string given in /Applications/MAMP/htdocs/wordpress/wp-admin/includes/template.php on line 975”
Bizarrely a 4th meta box also appear rather than the 3 that are normally visible.
This is the code used for the CPT:
if (is_admin()) :
function my_remove_meta_boxes() {
remove_meta_box('rs_private_photo_archive_reader', 'photo_archive', 'advanced');
remove_meta_box('rs_photo_archive_contributor', 'photo_archive', 'advanced');
remove_meta_box('rs_photo_archive_editor', 'photo_archive', 'advanced');
}
add_action( 'add_meta_boxes', 'my_remove_meta_boxes' );
endif;
Do you see any problem or know why this might be happening?
I might be the only one who think it’s necessary – but I’d love to see a toggle in the admin added to control this rather than having to override it like this ??
Thanks for the support.