For Gravatars:
echo bb_get_avatar( bb_get_current_user_info( ‘id’ ), 32 )
Where 32 is the pixel size of the Gravatar.
(That’s 1.0 code… not sure about 0.9.)
Many thanks timskii!
Ranked 100% on the Awesomage meter!
fixed.. img.avatar { border: 0px solid #ddd; }
Please, how did you use the code <<echo bb_get_avatar( bb_get_current_user_info( ‘id’ ), 32 )>> to display the avatar or gravatar of the logged-in user in the header. Any explanation on what to do?
This code is from version 1 of bbpress, so probably no longer works.
Please, could you suggest any other solution?
depends on what you mean by ‘solution’ 🙂
get_avatar( wp_get_current_user(), 32 );
so where do you want to put this ?
I’m new to coding and do not know much about these things. I would like the avatar or gravatar to show on the right corner of my header.
First of all, do I need to put this code <<get_avatar( wp_get_current_user(), 32 );>> in my header.php file?
And do I need to write some CSS code to style it?
ok, so that is going to be hard to answer as your site is unique to you, and this is theme and setting dependant.
a bit like me asking you where the best place in my bathroom to put the towel rail, and how to install it when I don’t know what a drill is 🙂