in

Add Author Bio To Your WordPress Posts

Do you want to add a author bio to your WordPress posts. Some themes have that function built in. This article shows how you can by a few steps adding the author bio to your posts.

We put the “About The Author” section just above the comments – but first go to the “Users” section in your WP Admin panel – enter all of the details you want to show on this page. In particular, make sure that you set the “Display name publicly as” field to your  name and that you complete the “Biographical Info” section.

You can also include links in your “Biographical Info” section if you surround the appropriate text with<a> tags. For our author bio section we need to access the public name you entered and your biographical information.

Advertisement

add a author bio to your WordPress posts

Add Author Bio To Your WordPress Posts

We can get the author name via the WordPress function <!–?php the_author() ?–>. Similarly, we can get the biographical information that you entered via the WordPresss function <!–?php the _author_description ?–>.You need to enter these WordPress tags into your single.php file – open that file and locate the place where you add your comments (i.e. the line where it says <!–?php comments_template() ?–>).</a>

Just above that line you’ll have to add the following code:

<div id=”author-bio”>
<h3>About The Author</h3>
<img src=”<?php bloginfo(‘url’); ?>
/wp-content/themes/your-theme/images/picture” alt=”your name” />
<h4><?php the_author(); ?></h4> <?php the_author_description(); ?>
</div><!–end author-bio–>

Let’s break that down a bit. On line 1 we create a new author biography container – we then have the title (“About The Author”) followed by an image. Make sure that you change the URL of your image to a URL where you have the photo.

On line 4 we then add the author name (i.e. and follow that with the biographical information.

To tidy this up we need to add a bit styling – add the following code to your CSS stylesheet (i.e your style.css file):

#author-bio { border-top: 1px dotted #cccccc; border-bottom: 1px dotted #cccccc; padding: 15px 0; }
#author-bio h3 { font-size: 18px; margin: 0 0 10px 0; }
#author-bio h4 { font-size: 14px; margin: 0 0 3px 0; }
#author-bio img { float: left; width: 75px; padding: 2px; border: 1px solid #cccccc; margin: 5px 15px 0 0; }

Advertisement

Written by Jonny

Hi! I am the author and publisher of this site. Please feel free to comment the articles and don´t forget to share the articles!

Leave a Reply

Your email address will not be published. Required fields are marked *