Hello,
I created a custom post type.
I’m trying to remove the AIOSP meta box using this code for authors only.
function remove_aiosp_meta_box() {
$current_user = wp_get_current_user();
if(!in_array(‘administrator’,(array)$current_user->roles) ) {
remove_meta_box(‘aiosp’, ‘myposttype’, ‘normal’);
}
}
add_action(‘do_meta_boxes’, ‘remove_aiosp_meta_box’);
But the meta boxes keeps on my post type even.
I also have User Role Editor plugin were Authors have no capabilities for aiosp_manage_seo.
How should i do to remove the metabox for authors.
Thanks in advance