Enter your keyword

Blog

How to get User Role in WordPress

 function get_user_role() {
     global $current_user;
     $user_roles = $current_user->roles;
     $user_role = array_shift($user_roles);
     return $user_role; 
 }

No Comments

Add your review

Your email address will not be published.

* Feilds are Required.