I have a php widget, and I need to show the avatar of the current logged in user, and I'm calling this code:
<?php echo get_avatar(); ?>
But its only outputting the default avatar.
Is there a global I need to add above it?
This should work great... in this example i am using wordpress codex so you can comapre:
From Wordpress Codex
so... Based on that...
This is the code you should embed in the desired location in your theme: