Change WordPress user roles and capabilities Forums How to or FAQ How do I hide the black wordpress menu from subcribers? Reply To: How do I hide the black wordpress menu from subcribers?

#1304
Vladimir
Keymaster

Hi,

If you wish to block ‘Dashboard’ menu at the admin back-end for your members role use ‘Admin menu access’ add-on for that:
https://www.role-editor.com/block-admin-menu-items

If you add this code to the end of active theme’s functions.php file (replace ‘subscriber’ to the role assigned to you site members.):

function hide_admin_menu_bar() {
    show_admin_bar(false);
}
if (current_user_can('subscriber')) {
    add_action('wp_head', 'hide_admin_menu_bar');
}

your members will not see black top menu bar at front end.