There are a number of plugins and tutorials for adding a gravatar image to the meta info for WordPress posts. But my client wanted the ability for each other to upload/maintain their own images within their WordPress profiles. Here’s how I did it.
First I installed the plugin Author Image – this places a simple upload box at the bottom of a user’s profile page. Nice and simple.
Next, I used the code snippet provided for the plugin and added it to the .entry-meta section beside the author link in my template page:
<?php the_author_image(); ?>
I styled it to make it smaller, but again this was an easy task. Next, I wanted to make the image link to the author’s posts page – that proved to be harder than expected, but eventually I got it working thanks to a post I found about an outdated user image plugin:
<?php $author_id=$post->post_author; $curuser = get_userdata($author_id); $author_post_url=get_author_posts_url($curuser->ID, $curuser->nicename); echo 'user_nicename ) . '" ' . '>'; the_author_image(); echo ''; ?>
Easy to implement and my client’s authors can control their image from within their profile rather than having to update a gravatar.
« Feeling spoiled by Hostgator. Again. Parsing PHP in HTML »


Great info…i was wondering how to add author info….it has surely helped me a lot….thanks for sharing