0131 478 2702

so, here’s the code to hide all sorts of things including plugins (Contact Form 7, Head uP Bar, Visual Composer,Carousel horizontal posts content slider  and Advanced Custom Fields) from WordPress admin area for the Role Author:

//* Limit Author access
add_action( 'admin_init', 'my_remove_menu_pages' );
function my_remove_menu_pages() {
global $user_ID;
if ( current_user_can( 'author' ) ) {
remove_menu_page('link-manager.php'); // Links
remove_menu_page('edit-comments.php'); // Comments
remove_menu_page('edit.php?post_type=ai1ec_event'); // Events
remove_menu_page('edit.php?post_type=wa_chpcs'); // CHCPS
remove_menu_page( 'wpcf7' ); // Forms
remove_menu_page( 'vc-welcome' ); // VC
remove_menu_page( 'theme-general-settings' ); // general-settings
remove_menu_page('edit.php?post_type=heads_up_bar'); // heads_up_bar
remove_menu_page('users.php'); // Users
remove_menu_page('tools.php'); // Tools
remove_menu_page('profile.php'); // profile

}
}