Here is the snipper checks whether the logged user is admin
<?php $is_admin = current_user_can( 'manage_options'); if($is_admin=="admin") {echo "Logout Administrator";} else { echo"Logout Client"; }?></a>
<?php $is_admin = current_user_can( 'manage_options'); if($is_admin=="admin") {echo "Logout Administrator";} else { echo"Logout Client"; }?></a>
Labels:
Wordpress
Previous Article

Responses
0 Respones to "How to check if a WordPress user is an “administrator”"
Post a Comment