In wordpress we have a function is_admin() which return us true value if loged in user is admin only in admin panel of wordpress so if we want to see that if user is loged in and if he is admin we have to use the function current_user_can as following.
[php]
if(current_user_can(‘manage_options’)) {
echo ‘You are admin!’;
} else {
echo ‘You are not admin!’;
}
[/php]
How useful was this post?
Click on a star to rate it!
Average rating 0 / 5. Vote count: 0
No votes so far! Be the first to rate this post.
We are sorry that this post was not useful for you!