$current_user = wp_get_current_user();
$isStudent = in_array( 'student_role' , $current_user->roles);
Last active
November 11, 2016 01:38
-
-
Save dianjuar/f644b049a5402e68bef5a269057a610c to your computer and use it in GitHub Desktop.
In Wordpress, if the current user has a determined role
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment