Skip to content
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Dec 12, 2013

README.md

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.

Usage

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 [display-user-avatar] or <?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 get_avatar() function.

Follow me on twitter, LinkedIn, Google+ or Facebook or visit my site and blog.

Copyright © 2013 Riyadh Al Nur. All rights reserved.

About

Shortcode to display user avatar anywhere in WordPress.

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.