I’m trying load a style sheet is a user role is subscriber, what am I doing wrong:

<?php
global $current_user; 
get_currentuserinfo(); 
if ( user_can( $current_user, "subscriber" ) ){ 
echo '<link rel="stylesheet" href="/login/subscriber-style.css">'
} 
?>

This is in the header.php of the theme

Read more here: Load CSS for User role subscriber (WordPress)


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: