Comments 6João started the conversationMay 26, 2021 at 6:34pmHi,I want my employees to have access to the backend. But I want to hide some of the tabs just leaving access to Calendar and Employees.How can I do this?Thanks in advance.João[deleted] repliedMay 27, 2021 at 9:43amHi João,thank you for reaching out to us!Unfortunately we don't have a way to limit the tabs, but you can install User Role Editor plugin to change what capabilities your Employee will have in the backend. 6João repliedMay 27, 2021 at 9:58amHi Ivana,Thanks for the reply.I have installed Add Admin CSS and I think I got this:/*Hide Appointments #toplevel_page_amelia > ul > li:nth-child(3){ display: none;}/*Hide Events #toplevel_page_amelia > ul > li:nth-child(4){ display: none;} /*Show Appointments for administrator.role-administrator #toplevel_page_amelia > ul > li:nth-child(3) { display: block!important; }/*Show Events for administrator .role-administrator #toplevel_page_amelia > ul > li:nth-child(4) { display: block!important; }Added this function to functions.phpfunction wpa66834_role_admin_body_class( $classes ) { global $current_user; foreach( $current_user->roles as $role ) $classes .= ' role-' . $role; return trim( $classes );}add_filter( 'admin_body_class', 'wpa66834_role_admin_body_class' );[deleted] repliedMay 31, 2021 at 11:58amHi João,thank you for the kind reply! I apologize for the later response, as we don't work on weekends.If this works for you, wonderful - have you had a chance to test it yet? Sign in to reply ...
Hi,
I want my employees to have access to the backend. But I want to hide some of the tabs just leaving access to Calendar and Employees.
How can I do this?
Thanks in advance.
João
Hi João,
thank you for reaching out to us!
Unfortunately we don't have a way to limit the tabs, but you can install User Role Editor plugin to change what capabilities your Employee will have in the backend.
Hi Ivana,
Thanks for the reply.
I have installed Add Admin CSS and I think I got this:
/*Hide Appointments
#toplevel_page_amelia > ul > li:nth-child(3){
display: none;
}
/*Hide Events
#toplevel_page_amelia > ul > li:nth-child(4){
display: none;
}
/*Show Appointments for administrator
.role-administrator #toplevel_page_amelia > ul > li:nth-child(3) {
display: block!important;
}
/*Show Events for administrator
.role-administrator #toplevel_page_amelia > ul > li:nth-child(4) {
display: block!important;
}
Added this function to functions.php
function wpa66834_role_admin_body_class( $classes ) {
global $current_user;
foreach( $current_user->roles as $role )
$classes .= ' role-' . $role;
return trim( $classes );
}
add_filter( 'admin_body_class', 'wpa66834_role_admin_body_class' );
Hi João,
thank you for the kind reply! I apologize for the later response, as we don't work on weekends.
If this works for you, wonderful - have you had a chance to test it yet?