How to Check if WordPress User is Admin

/How to Check if WordPress User is Admin

A few people have asked me this question, so I thought I would share it with you all (yes, both of you).  It’s a tiny snippet that’s not rocket science and you can find it if you look hard enough, but it’s oh, so useful.

So how do you find whether the current logged in user is an admin?


<?php if ( current_user_can('manage_options')) { echo 'I am an admin!'; } ?>


2013-10-21T15:49:36+00:00February 27th, 2012|WordPress Snippets|0 Comments

About the Author:

Warren Chandler is a freelance web programmer and web developer, based in Frinton on Sea, Essex. Warren specialises in web programming, web design, corporate identity, copy writing, SEO, logo and print media for home, work, and mobile platforms.

Leave A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.