WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am customizing the WP admin area and want the functions I am using to only affect a specific user. Any Ideas on how to write this?

share|improve this question
if ( $current_user->ID === <ID of user to isolate>) {
   // user specific code


That is a very general solution. There may be other/better solutions but you didn't provide much information about what you are trying to accomplish.

share|improve this answer
<?php get_currentuserinfo(); ?>

Then check if the returned value for $current_user->ID is the ID of the user you want and then display the content for that user only?

See the Codex

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.