WP User Avatar Plugin WordPress, Download, Install
Use any image from your WordPress Media Library as a custom user avatar. Add your own Default Avatar.
WP User Avatar Download Now
(If the link does not work)↓
Originals Link WordPress.org
https://wordpress.org/plugins/wp-user-avatar/
How to Install WP User Avatar Plugin, Manually
Visit WP User Avatar for more information and documentation.
- Download, install, and activate the WP User Avatar plugin.
- On your profile edit page, click “Edit Image”.
- Choose an image, then click “Select Image”.
- Click “Update Profile”.
- Upload your own Default Avatar in your WP User Avatar settings (optional). You can also allow Contributors & Subscribers to upload avatars and disable Gravatar.
- Choose a theme that has avatar support. In your theme, manually replace
get_avatar
withget_wp_user_avatar
or leaveget_avatar
as-is. Read about the differences here. - You can also use the
[avatar_upload]
and[avatar]
shortcodes in your posts. These shortcodes will work with any theme, whether it has avatar support or not.
Example Usage
Posts
Within The Loop, you may be using:
<?php echo get_avatar(get_the_author_meta('ID'), 96); ?>
Replace this function with:
<?php echo get_wp_user_avatar(get_the_author_meta('ID'), 96); ?>
You can also use the values “original”, “large”, “medium”, or “thumbnail” for your avatar size:
<?php echo get_wp_user_avatar(get_the_author_meta('ID'), 'medium'); ?>
You can also add an alignment of “left”, “right”, or “center”:
<?php echo get_wp_user_avatar(get_the_author_meta('ID'), 96, 'left'); ?>
Author Page
On an author page outside of The Loop, you may be using:
<?php $user = get_user_by('slug', $author_name); echo get_avatar($user->ID, 96); ?>
Replace this function with:
<?php $user = get_user_by('slug', $author_name); echo get_wp_user_avatar($user->ID, 96); ?>
If you leave the options blank, WP User Avatar will detect whether you’re inside The Loop or on an author page and return the correct avatar in the default 96×96 size:
<?php echo get_wp_user_avatar(); ?>
The function get_wp_user_avatar
can also fall back to get_avatar
if there is no WP User Avatar image. For this to work, “Show Avatars” must be checked in your WP User Avatar settings. When this setting is enabled, you will see the user’s Gravatar avatar or Default Avatar.
Comments
For comments, you might have in your template:
<?php echo get_avatar($comment, 32); ?>
Replace this function with:
<?php echo get_wp_user_avatar($comment, 32); ?>
For comments, you must specify the $comment variable.
Other Available Functions
[avatar_upload] shortcode
You can use the [avatar_upload]
shortcode to add a standalone uploader to a front page or widget. This uploader is only visible to logged-in users. If you want to integrate the uploader into a profile edit page, see Other Notes.
You can specify a user with the shortcode, but you must have edit_user
capability for that particular user.
[avatar_upload user="admin"]
[avatar] shortcode
You can use the [avatar]
shortcode in your posts. It will detect the author of the post or you can specify an author by username. You can specify a size, alignment, and link, but they are optional. For links, you can link to the original image file, attachment page, or a custom URL.
[avatar user="admin" size="medium" align="left" link="file" /]
You can also add a caption to the shortcode:
[avatar user="admin" size="medium" align="left" link="file"]Photo Credit: Your Name[/avatar]
Note: If you are using one shortcode without a caption and another shortcode with a caption on the same page, you must close the caption-less shortcode with a forward slash before the closing bracket: [avatar /]
instead of [avatar]
get_wp_user_avatar_src
Works just like get_wp_user_avatar
but returns just the image src. This is useful if you would like to link a thumbnail-sized avatar to a larger version of the image:
<a href="<?php echo get_wp_user_avatar_src($user_id, 'large'); ?>"> <?php echo get_wp_user_avatar($user_id, 'thumbnail'); ?> </a>
has_wp_user_avatar
Returns true if the user has a WP User Avatar image. You must specify the user ID:
<?php if ( has_wp_user_avatar($user_id) ) { echo get_wp_user_avatar($user_id, 96); } else { echo '<img src="my-alternate-image.jpg" />'; } ?>
Video
Screenshots
Plugin Not Working?
If any errors or problems with the plug-in then write comments.
Related:
- Choosing a web server operating mode based on…
- What is Infolinks.com?
- WordPress plugins for bitcoin and cryptocurrencies
- Choosing a WordPress caching plugin: benchmarking 18 plugins
- How To Center Text In Gimp
- Peter Shepherd (Trans4mind.com) Webmaster From The…
- ROBLOX BALLER
- Owner of the GudStory Blog. Webmaster From India.…
Related Posts
Related Posts Widget Plugin WordPress, Download, Install
YOURLS Link Creator Plugin WordPress, Download, Install
Fade Slider Plugin WordPress, Download, Install
About The Author
admin
I am are a 5 years has been a freelancer, engaged in web design, website building.