You should be able to just use something like
$current_user = wp_get_current_user();
$output .= get_avatar( $current_user->ID, 32 );
return $output;
The Emporium eShop theme (currently still in beta) includes a custom Login Widget that displays the user avatar. You might want to try downloading that theme and having a look in /library/login-widget.php.
so ie
<?php
$current_user = wp_get_current_user();
$output .= get_avatar( $current_user->ID, 32 )
return $output;
?>
Im a bit of a noob at this. BTW Nice themes
Sort of. It really depends upon what you’re doing within this widget and how it’s set up to generate the final content. The widget I created pours everything into a $output variable which is then returned and echoed to the screen. A simpler method would be to just use:
<?php
$current_user = wp_get_current_user();
echo get_avatar( $current_user->ID, 32 );
?>
BTW Nice themes
Thank you. 🙂
Sorry I might not have been clear. Im not creating the widget. What I am doing is making an image link <img src=”images/users/<user id here>.jpg”>
I am using a widget which allows php
i cannot thank you enough
it works perfectly