User Avatar WordPress
This small shortcode lets you display the user avatar anywhere on a site built on WordPress. The shortcode takes care of logged in user and normal users. Logged in users will be shown their avatars. Logged out or nornmal users will be shown the default WordPress avatar which can be changed from Settings > Discussion.
You can include the .php file in your theme's functions.php file or copy and paste the code into the functions.php file itself.
Use this shortcode by using
<?php echo do_shortcode('[display-user-avatar]')?> if you are using the shortcode outside the editor in a php file.
You can also adjust the size of the avatar by changing the integer parameters in the
Copyright © 2013 Riyadh Al Nur. All rights reserved.