Is there a conditional tag that will allow me to display certain content only if the user is NOT a subscriber?

3

<?php
$current_user = wp_get_current_user();
if ( ! user_can( $current_user, "subscriber" ) ) // Check user object has not got subscriber role
    echo 'User is a not Subscriber';
else
    echo 'User is a Subscriber';
?>

Leave a Reply

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