How to add author bio box in WordPress Thesis below post

If you are using WordPress Thesis 1.8 theme and want to add a nice author bio box below your single post, then here is the code to do that. Author bio looks nice and professional in WordPress Thesis theme and it also helps in personal branding as well as in SEO since you can put the special keywords there.

Step 1 – Go to your Thesis custom file editor and open custom_functions.php. Copy the code below.

function post_author() {
	if (is_single())
	{
	?>
	<div class="postauthor">
		<?php echo get_avatar( get_the_author_id() , 100 ); ?>
		<h4>Article by <a href="<?php the_author_url(); ?>">
		<?php the_author_firstname(); ?> <?php the_author_lastname(); ?></a></h4>
		<p><?php the_author_description(); ?></p>
		<p class="hlight"><?php the_author_firstname(); ?> has written <span><?php the_author_posts(); ?></span> awesome articles for us.</p>
	</div>
<?php
	}
}
add_action('thesis_hook_after_post_box', 'post_author'); 

If you already have a Gravatar account, your photo will be taken automatically. Also you need to write a short keyword rich bio in your WordPress users -> your profile section. You are done then. The last thing you need to do is adding some css in your Thesis custom.css file.

Step 2 – open Thesis custom.css file and copy the css code below.

 /* Author Post Box */
.custom #comments { clear: both; }
.postauthor { background: #F5F5F5; border-top: 1px solid #e1e1e0; border-bottom: 1px solid #e1e1e0; overflow: hidden; padding: 1.5em;width: 599px; margin-top:5px;}
.postauthor img { border: 5px solid #e2dede; float: left; margin-right: 1.5em; }
.postauthor h4 { color: #666; font-size: 2em; margin-bottom: 5px; }
.postauthor p { color: #515151; font-size: 13px; margin-bottom: 12px; }
.postauthor p.hlight { font-size: 11px; text-transform: uppercase; }
.postauthor p.hlight span { color: #CB3131; font-size: 13px; font-style: italic; font-weight: bold; letter-spacing: 0.8px; } 

Now you are done. Your WordPress author bio box will look like this.

author box in thesis How to add author bio box in Wordpress Thesis below post

No related posts.

About Debajyoti

Debajyoti Banerjee is the Founder and CEO of Seven Boats Info-System Pvt. Ltd. - A full service digital marketing company in India. Debajyoti is an experienced SEO expert and Internet Marketing consultant from Kolkata, India. As a web entrepreneur and online marketing strategist, he is helping many companies to transform their businesses to the next level of success by 1) making their websites convenient, interactive and immediate; 2) helping them to reduce cost and increase efficiency; 3) making their websites more flexible and 4) helping them to get more global customers.

Comments

  1. Thanks for this – I’ve used it on my site. Just a note, I changed the width in the custom.css from 599px to * so that it fit my blog’s width.

  2. Thank you, that worked perfect. :)

  3. wazy says:

    Hi
    1st i want say thanks to you for this tutorial,it really works
    and i found this blog form google
    nice to meet u

  4. Jacob says:

    Thank you for this, I have been researching this and yours is the first to work with a simple cut and paste

  5. I was searching for the same thing and it works. Kindly tell me how i make it come up? I mean its not coming on the place i want, above the ‘related plugins’.

    -Irfan

    • Debajyoti says:

      You need to tweak the code. Just insert the php function of related post after the author bio box. Don’t tick the insert ‘related posts automatically below post’ from plugin option.

  6. Beth says:

    What am I doing wrong? When I open up my custom.css file, it comes up as a webpage and will not allow me to edit it.

Speak Your Mind

*

CommentLuv badge