How To Add and Display Author Bio To Your WordPress Blog Posts in few simple Steps? Many of the blogs display the authors bio summary towards the end of each of the blog articles. Displaying the author details at the bottom of each of the post will give many advantages. Your blog readers will get quick information about the author. Many people are interested to read about the person who writes that is interesting.
How do you add the author information at the bottom of each of the article? There are many WordPress plugins that allows us to achieve the same. But if the number of plugins are more the page load time will be more. So today we will see how we can add author bio information at the bottom of each of the blog article without using any plugins.
how To Add Author Bio Detail at the bottom of each post
As you may aware, the WordPress template file which will be used to display individual posts is the “single.php” which will be available in your theme folder.
- Open the single.php and search for “<?php the_content(); ?>”. Below that you may find few more lines of code, if there are more than 1 page etc.
- Under that you can add the required PHP script to display the author information.
- Copy the above code and paste it where you identified the author bio needs to appear. In the above code the CSS style class used is “blog-author-info”. You need to create CSS class to make this proper. For example,
1 2
#blog-author-info { border-top:5px solid #cccccc; padding: 10px 0; } #blog-author-info h3 { font-size: 15px; margin: 5px 0 5px 0; }
You can add additional style attributes to make it attractive and match with your blogs theme.
- Now save the “single.php” file. Now you need to upload the changed file to the server. You can use FTP tools like Filezilla for this purpose. Once uploaded refresh your post pages and see everything displays properly or not. In this blog I have added my profile info at the end of this article. See it below.
1 2 3 4 5 | <div id="blog-author-info"> <h3>About <?php the_author(); ?>, the author of this blog</h3> <?php echo get_avatar(get_the_author_id(), 48); ?> <?php get_the_author_meta( 'description' ); ?> </div> |
In the above code “get_avatar” will fetch your default avatar picture. Get_the_author_meta( ‘description’ ) function will display the description which you have provided using WordPress Dashboard.
Before you go, subscribe to get latest technology articles right in your mailbox!.
It’s the_author_info() not get_the_author_info().