Add Author Box Manually – Without Plugin

By | 31/05/2012

Author biography bio can be added through plugin or manually by php code. Adding author box manually with php code is welcomed, becausse using plugin to display author box will increase the website loading time.

Read: Add author box with Plugins

 

Some of the plugins available to show the author biography are

  • Advanced Author Bio
  • WP About Author
  • Custom About Author
  • Author Box Reloaded

Go to post_single.php .  Paste this PHP code below <?php the_content(); ?> function

Select Code
1
2
3
4
5
6
7
8
9
10
11
<div class="outer">
<div class="image">
<img src="<?php bloginfo('template_directory') ?>/images/authors/<?php the_author_ID()?>.jpg" alt="<?php the_author(); ?>" width="100" height="100">
</div>

<div class="desc">
<h3><?php the_author_link(); ?></h3>
<?php the_author_meta('description'); ?>
</div>

</div>

<?php bloginfo(‘template_directory’) ?>  – It retrieves the current theme Eg:  www.tobbynews.com/wp-content/themes/ihost

<?php the_author_ID()?>   – It retrieves the author ID of the author, which is used to get the image of the author from the directory /images/themes/. Author images are stored in the name of their author ID

<?php the_author_link(); ?>   – This link redirect us to a page, where all posts are written by the author

<?php the_author_meta(‘description’); ?>    – Description about the author, which is the data filled up in the User profile.

 

CSS  for author box is here, just paste this code in style.css

Select Code
1
2
3
4
5
.outer{ border-style:solid; }

.image{ float:left;width:100px;height:100px;margin:25px; }

.desc{float:left;margin-top:25px;width:425px;}

Post By prasad (110 Posts)

Website: →

Connect

About prasad

Prasad K has written 110 post in this blog.

One thought on “Add Author Box Manually – Without Plugin

  1. Sheila MN

    Hi there, I want my profile picture to appear in google search when they search for my website. But I can’t seem to do it. I have linked my google+ to my blog but it still doesn’t seem to work.

    Please help. Thanks.

    Reply

Leave a Reply