Many blogs now that have more than one author that posts for them. Sometimes it’s hard for readers to know which of the author’s wrote it because usually the author credentials are small. Therefore, in this Post will show you how you can add an author’s image in their individual posts.

How to add Authors Image in WordPress

This tutorial is easy to follow. You don’t need any special plugin. Just add a short snippet of code. You will need to create an author’s profile and add the email address which is also registered with gravatar. Once that has been done, then follow the directions below:

  1. First, you need to open PHP and/or index.php
  2. Add the following code where you see.
<?php echo get_avatar( get_the_author_email(), '40' ); ?>

Basically, this code will take the email you entered in the author’s profile and try to fetch the gravatar associated with that email. The 40 value represents the size in pixels which you can change to match your design formatting.

Read: How to display Users in WordPress

If you have found a spelling error, please, notify us by selecting that text and pressing Ctrl+Enter.

Also Read  Display Related Posts in Wordpress

CMSFolks Editorial Crew

Editorial Staff at CMSFolks is a team of WordPress experts led by Ajayi Adekunle. Site maintained by CMSFolks Studio.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu

Spelling error report

The following text will be sent to our editors: