custom css for admin only
The code that you’ve tried already adds the role CSS class to the admin_body_class, which only affects the admin area/backend. Simply change the filter to alter the frontend body class body_class, eg. function wpa66834_role_admin_body_class( $classes ) { global $current_user; foreach( $current_user->roles as $role ) $classes .= ‘ role-‘ . $role; return trim( $classes ); } … Read more