This code snippet will exclude “WP Bakery Page Builder” welcome page menu item from the left side admin menu for the current user with ‘author’ role:
add_action('admin_menu', 'hide_vc_welcome', 100);
function hide_vc_welcome() {
global $menu;
$user = wp_get_current_user();
if (empty($user)) {
return;
}
if (!is_array($user->roles) || !in_array('author', $user->roles)) {
return;
}
foreach($menu as $key=>$item) {
if ($item[2]=='vc-welcome') {
unset($menu[$key]);
break;
}
}
}