Make an author box in WordPress

March 31, 2010 · Print This Article

In this tutorial you will learn how to add the author’s profile box at the end of the wordpress post. If you have a gust authors it is good to have author’s profile box.

You can easily change background, border colors by editing CSS code.

Please make sure to backup theme before changing anything.

Please add below CSS code in your style.css file which is located in your theme directory.


#authorbox{
background:#EFEFEF;
border:1px solid #CECFD0;
width:638px;
margin:0 auto;
margin-bottom:10px;
overflow:hidden;
}
#authorbox h4{
font-size:16px;
color:#191919;
margin:0;
padding:10px 10px 5px 10px;
}
.authortext{
padding-left:100px;
}
#authorbox img{
margin:0;
padding:10px;
float:left;
}
#authorbox p{
color:#191919;
margin:0;
padding:0px 10px 10px 10px;
}
#authorbox h4 > a{
text-decoration:none;
}
#authorbox p{
color:#191919;
}

Once you have added above code in style.css, open single.php and add below code

<div id="authorbox">
<?php if (function_exists('get_avatar')) { echo get_avatar( get_the_author_email(), '80' ); }?>
<div class="authortext">
<h4>About <?php the_author_posts_link(); ?></h4>
<p><?php the_author_description(); ?></p>
</div>
</div>


Your choice for site templates and wordpress themes

Comments

Got something to say?

You must be logged in to post a comment.