WP for Wordpress

How to check if a WordPress user is an “administrator”



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>


Responses

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

Post a Comment

AddThis

 

Recent Comments

Return to top of page Copyright © 2014