If you run a blog, magazine or any other website that has multiple authors, editors this little widget is very useful if you want to display an About Author below your articles. It will look similar to the one on this article or in the screenshot below.
You can do this in two simple steps:
- Copy + paste the CSS code below somewhere inside your theme’ style.css file:
.post_author { background:#eeeeee; margin:0 0 20px 0; overflow:hidden; -webkit-border-radius:2px; -moz-border-radius:2px; border-radius:2px; } .post_author_avatar { float:left; width:90px; height:72px; } .post_author_text { float:left; } .post_author img { margin:0; padding:3px; } - Copy + paste the HTML+PHP code below, inside your theme’ single.php file, after calling the_content(‘Read the rest of this entry ←’) function:
<div class="post_author"> <?php if (function_exists('get_avatar')) { echo "<div class=\"post_author_avatar\">" . get_avatar( get_the_author_email(), '64' ) . "</div>"; }?> <div class="post_author_text"> <h3>About <?php the_author_posts_link(); ?></h2> <?php the_author_description(); ?> </div> </div>
I hope you find it useful and feel free to customize it as you like. Please let me know any questions you have ;)








Leave a comment