您可以使用wp\\u head hook action&;在html标题上添加自定义css;正在检查当前用户角色
add_action(\'wp_head\', \'add_css_of_current_specific_user_role\');
function add_css_of_current_specific_user_role()
{
/*Check Current User is Login*/
if ( is_user_logged_in() )
{
$user = wp_get_current_user();
/*Check Current User Role*/
if (in_array(\'visitor\', $user->roles)) { ?>
<style>
// Some CSS
</style>
<?php }
}
}