I’ve been searching for a plugin and can’t seem to find anything. I’m simply trying to display the current logged-in user’s avatar, with a link to their BP profile, in a side-bar widget. If user has no avatar, then the default avatar shows.
My idea was to display this widget in bbpress.
WP PHP widget plugin can easily be used to post the php (I just can’t figure out what the php should be).
The closest thing I could find is…
<?php
wp_get_current_user();
$size = array(60,60); // this is the size of the avatar
echo get_avatar( $current_user->user_email, $size, $default, $current_user->display_name );
?>
..but I couldn’t get this to work. Any suggestions greatly appreciated.