How to get admin User ID?

It’s been really difficult for many to get back the admin user ID but it’s so simple because this code snippet will help to get it to the way you are waiting for.

Let’s check how it is working…

Copy to Clipboard


So, All you need to add this code snippet to your theme functions.php file to know admin user ID easily.

Farooq Abdullah

Web Developer

Farooq Abdullah is a professional Web Developer having more than 6 years of working experience in different PHP platforms especially WordPress. He is bachelors in computer science and he has also developed many plugins, add-ons and code snippets to facilitate others.

Sign up to our Newsletter

(We do not share your data with anybody, and only use it for its intended purpose)