Load CSS for User role subscriber (WordPress)

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)

Leave a Reply

Your email address will not be published. Required fields are marked *