Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm using the Simple Local Avatars plugin so my bbPress forumgoers can upload their own avatars. Now, when a user logs in, I want his/her avatar to display next to the relevant links (i.e. logout, edit profile, etc.). I tried the call below but it only keeps showing the default mystery man gravatar.

<?php echo get_avatar( $current_user->user_login, 48 ); ?>

Is there something I overlooked? How can I get the user's uploaded avatar to show up?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

And of course as soon as I post the question, I find the answer.

slaps forehead

<?php
        global $current_user;
        get_currentuserinfo();
        echo get_avatar( $current_user->ID, 48 );
 ?>
share|improve this answer

Your Answer

 
discard

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.