I have a review based wordpress site where I have a page for each different company where there users can review them. The theme I use adds a custom post type called "review" and I have used Press Permit to create limited user accounts that can modifying some parts of these review pages.
I wanted to hide some of the Meta Boxes that they should not have access to such as Yoast SEO, GD Star Ratings, etc. I followed the instructions from some other posts on this website, however it does not hide the meta boxes as it should.
I have added the following code at the end of the "functions.php" in my Theme directory as per the instructions at WordPress SEO by Yoast: Hide Meta boxes in posts for non-admins
add_action('add_meta_boxes', 'hide_yoastseo_metabox', 99);
function hide_yoastseo_metabox()
{
if (!current_user_can('activate_plugins'))
{
remove_meta_box('wpseo_meta', 'review', 'normal');
}
}