Are you looking for a way to display the current authors avatar? While there’s probably a plugin for this, we have created a quick code snippet that you can use to display the current authors avatar in WordPress.
Instructions:
All you have to do is add this code to your theme’s single.php file:
<?php echo get_avatar( get_the_author_email(), '60' ); ?>
Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly copy / paste code snippets in WordPress, so you don’t accidentally break your site.
If you liked this code snippet, please consider checking out our other articles on the site like: 10 best WordPress plugins for web developers and how to secure your WordPress forms with password protection.
Is there a Gutenberg Block solution that adds an avatar option in a Post list?
You may want to check out this plugin: https://wordpress.org/plugins/author-avatars/
Sadly we are not able to confirm if this plugin has this feature for a post list.
I want to know how to get guest author image from the custom field of the post
Hi Kevin,
Thanks for the post… how to add the author picture and brief info at the end of the post? There are some computer posts that there are different authors, they add their image and short “about me ” at the end of the post which is very cool.
If the theme doesn’t have an author box, you may want to check out: https://wordpress.org/plugins/author-bio-box/
hi Kevin, how to replace featured image of a post by author avatar. plz help me
It have a way to catch this src link to put in my configurations? like <img src="/images/fake-avatar.jpg” title=”Richard Dawkings” class=”fl gravatar-author”> I’m won’t like a wordpress config to gravatar author post used, I wanna use my way.
you can use this snippet to set a default gravatar image,
http://wpsnipp.com/index.php/comment/custom-default-gravatar-image/
sorry to bother you again … but it doesn’t do what i wanted than anyway mate …. cheers