For the Multi-author sites, WordPress has built-in functionality to display Author Bios to a single post, and there are some plugins to help as well. There are three thinks that we need to get to display Author Bios:
- The author‘s name
- The author‘s short bio
- The author‘s photo
1. The author‘s name
The easiest way for this, There is a built in WordPress function for displaying it:
You can change the “Display Name” under user Profile setting, If you don‘t do this, it will show the username of the Author, which among other limitations, doesn‘t allow spaces.
2. The author‘s short bio:
This is also very easy to set up, just a lesser-known WordPress function:
This biography information you can add directly to any user from the Admin area.
Just edit the user profile and add the bio, and save.
3. The author‘s photo:
To get an author‘s photo is slightly trickier. There are a few different ways you can take.
3.1. Display Author Gravatar
Gravatars (A Globally Recognized Avatar)are the most common way to handle user thumbnails in the WordPress world.
Use the following code to display the Gravatar of the author of the current post. Add this code within the Loop:
$gravatar_link = 'http://www.gravatar.com/avatar/' . md5(get_the_author_meta('user_email')) . '?s=96'; echo '<img src="' . $gravatar_link . '" alt="" />';
3.2. User Photo Plugin
Allows a user to associate a profile photo with their account through their “Your Profile” page. Admins may add a user profile photo by accessing the “Edit User” page. Uploaded images are resized to fit the dimensions specified on the options page; a thumbnail image correspondingly is also generated. User photos may be displayed within a post or a comment to help identify the author.