If you have a blog with multiple authors or just want to add your Author Bio to the end of every post you can do it with the following code snippet. Please note that this code snippet uses some of the standard functions to populate that area with information, but you can easily replace this information with your own description if you like. Below is an example that I used on a site, but feel free to use and change to your needs.

The CSS For Your Author Bio

.post-author {
  background: #F5F5F5;
  border-top: 1px solid #e1e1e0;
  border-bottom: 1px solid #e1e1e0;
  overflow: hidden;
  padding: 1.5em;
}
.post-author img {
  border: 5px solid #e2dede;
  float: left;
  margin-right: 1.5em;
}
.post-author h4 {
  color: #666;
  font-size: 2em;
  margin-bottom: 5px;
}
.post-author p {
  color: #515151;
  font-size: 13px;
  margin-bottom: 12px;
}

 

 

The Function For You Author Bio

function author_bio() {
if (is_single()) {
?>
  <div class="post-author">
    <img src="INSERT THE URL OF AN IMAGE YOU WOULD LIKE TO USE" alt="FILL THIS IN" title="FILL THIS IN"/>
    <h4>Article by <a href="<?php the_author_url(); ?>">
      <?php the_author_firstname(); ?> <?php the_author_lastname(); ?></a></h4>
      <p><?php the_author_firstname(); ?> has written <strong><?php the_author_posts(); ?></strong>  articles for us.</p>
      <p><?php the_author_description(); ?></p>
</div><!-- ENDS .post-author -->
<?php
}
}
add_action('thesis_hook_after_post_box', 'author_bio');

 

Please note that I was using Thesis (version 1.x) but you can simple replace the Thesis hook (thesis_hook_after_post_box) with a hook relevant to your theme, or you may need to make your own hook.

Leave a Reply

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

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>