How To Display Author’s Profile/Bio In Wordpress Blog

ADVERTISEMENTS

If you have a multi-author blog, then its good to display the biography of the author of the post. The bio that is displayed is the one that is in the Your Profile settings under Users. Have a look

profile

In this post I am going to tell you how you can display the author’s bio along with the Gravatar. Usually, its shown below every single post ends. So here also I’ll tell you how to display it after each post ends.
Firstly open style.css file and paste the following code at the end.
.author{
background: #ececec;
border:1px solid #cccccc;
font-weight: bold;
padding: 5px;
margin-top:10px;
margin-bottom:10px;
}
.avatar {
float: left;
width: 80px;
height: 80px;
}

What we have done is, we have created a new class named author and avatar and given it some formatting options. Now its time to use the class.

Now open Single.php file with any text editor.

Now, search for the_content and put the following code after it.
<div class="author">
<?php
$author_email = get_the_author_email();
echo get_avatar($author_email, '80', 'avatar');
?>
<?php the_author_description(); ?>
</div>

Now save your work and enjoy. You can set the settings as per your requirements in style.css file.


If you like this post, you will love these :

  1. How to Create Author.php Page For Your Wordpress Blog
  2. How To Make Your Blog Multi Author
  3. How To Add Gravatar Beside Each Post In Wordpress
  4. How To Install Author Advertising Plugin and Make A Revenue Sharing Blog
  5. 20+ Codes and Hacks Every Wordpress User Should Know
  6. Use Google Related Links To Display Related Articles In Your Blog
  7. How To Manually Add BreadCrumbs To Your Wordress Blog

Gaganpreet Singh on November 3, 2009 | Filed Under Wordpress

{ 6 comments… read them below or add one }

1 alok November 3, 2009 at 6:52 pm

Do implement this in your blog..

Reply

2 Gagan November 3, 2009 at 7:38 pm

sure….. :)

Reply

3 Mostlyblog November 3, 2009 at 7:19 pm

hey good post Gagan, thanks for sharing with us.

Reply

4 Ankit November 3, 2009 at 8:37 pm

Nice tutorial bro.. Will try to implement in ET too. :)

Reply

5 VISHAL November 5, 2009 at 5:05 pm

Thanks for the tutorial dude

Reply

6 Aneesh Bhatnagar December 14, 2009 at 2:36 pm

Thanks a lot for this post….

Reply

Leave a Comment

Previous post:

Next post: