0

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?

0
get_currentuserinfo();
if ( $current_user->ID === <ID of user to isolate>) {
   // user specific code
}

http://codex.wordpress.org/Function_Reference/get_currentuserinfo

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.

| improve this answer | |
0
<?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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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