How To Display Author Photo In WordPress

July 8th, 2008 by kailoon under Tips

The beauty of WordPress is it allow multiple authors for a site or even a single post. It is a good practice to show the author photo within a post written by him/her. Besides, we can also add a short “about me” description before or after every posts.

Here we go:

Step 1

Create a new directory in at wp-content/images and name it as authors, so it will become like this directory at wp-content/images/authors.

Step 2

Upload a picture which is named the same as your author ID. Don’t know where to get your author ID? DOn’t worry, here is a screenshot. Simply mouseover on the number of posts of the author and check out the browser’s status bar.
author-IDFrom here, the author ID is 1. So, just name your picture as 1.jpg.

Step 3

Copy and paste this code to wherever you wish the photo to be displayed.

1
<img src="<?php bloginfo('template_directory') ?>/images/authors/<?php the_author_ID()?>.jpg" alt="<?php the_author(); ?>" title="<?php the_author(); ?>" />

Step 4

If you find any problem on displaying the author photo. Firstly, Paste the URL to a browser to check whether the link is correct. For Example: http://www.domain.com/wp-content/images/authors/1.jpg. Secondly, if you can’t access via the link. Recheck the path of the directory. If you get it right. Then should be no problem.

Mini Tips

When you are displaying the autor photo. You may also wish to let the users know a little about the author. Without access to your full about page. You can display a short description about yourself using the following code.

1
<?php the_author_description(); ?>

Login to your admin panel. Goto Administration > Profile > Your Profile. There is a about yourself section. Type something about yourself in the Biographical Info input field. Done!

Hope your like this. Cheers!

Find out more in archives or subscribe rss feed for future updates.

Sponsor:

7 Comments | RSS 2.0 | Trackback Add comment
  1. 7 禾草唐楷 October 16th, 2008
  2. 6 Monica October 11th, 2008
  3. 5 joydayKessdrow August 3rd, 2008
  4. 4 kailoon July 11th, 2008
  5. 3 pictures July 10th, 2008

Leave A Comment

Premium Theme