Change WordPress user roles and capabilities › Forums › Give user access to plugin – how to › How to display admin bar for some user role › Reply To: How to display admin bar for some user role
07/08/2015 at 22:54
#1609
bikostudio
Participant
I copied the functions.php to the child-theme folder then i pasted in it this code and changed the some_role to the role name at it is in user role editor plugin which is data_entry to be like this :
add_action(‘wp_head’, ‘show_top_admin_menu_bar’, 100);
function show_top_admin_menu_bar() {
if (current_user_can(‘data_entry’)) {
show_admin_bar(true);
}
}