orbitsolutions
Active member
- May 5, 2022
- 213
- 68
- 28
where I place code? function.php ?// Remove Administrator role from roles list
add_action( 'editable_roles' , 'hide_adminstrator_editable_roles' );
function hide_adminstrator_editable_roles( $roles ){
if ( isset( $roles['administrator'] ) && !current_user_can('level_10') ){
unset( $roles['administrator'] );
}
return $roles;
}
Placed in your theme functions.php or create your own plugin.where I place code? function.php ?
Placed in your theme functions.php or create your own plugin.
I'm assuming @orbitsolutions using his own theme.I recommend to place it in your child theme functions.php to avoid losing it when you update
im using astraI'm assuming @orbitsolutions using his own theme.
So use your child themeim using astra