PreviousPauseNext
Latest Free WordPress Themes | More Free Themes
Digital Statement WordPress Theme
Digital Statement

Post Slideshow
Content Tabs
Widgetized
Twitter Ready
Flickr Ready

Demo
Download
Latest Free WordPress Themes | More Free Themes
Angel WordPress Theme
Angel

Light Colored
Valid CSS/XHTML
Widgetized
Unique Layout
Styled Comments
DOM Tabs

Demo
Download
Latest Free WordPress Themes | More Free Themes
Portfolio WordPress Theme
Portfolio Press

Dark Colored
Valid CSS/XHTML
Widgetized
Unique Layout
Styled Comments
Neat Code

Demo
Download
Latest Free WordPress Themes | More Free Themes
DailyPress WordPress Theme
DailyPress

Minimalistic Theme
125x125 Ad Space
Widgets Ready
Social Tagging
Tabbed Sidebar
XHTML Compliant

Demo
Download
Latest Free WordPress Themes | More Free Themes
Firebug WordPress Theme
Firebug

Colorful Theme
125x125 Ad Space
Widgets Ready
Social Tagging
Gravatar Ready
XHTML Compliant

Demo
Download
Latest Free WordPress Themes | More Free Themes
Gridblog WordPress Theme
Gridblog

Minimalistic Design
WP Gallery Ready
Gravatar Ready
Grid Based
Widget Ready
XHTML Compliant

Demo
Download
Latest Free WordPress Themes | More Free Themes
Blue Weed WordPress Theme
Blue Weed

WP 2.5 Gallery Compatible
Adsense Ready
Gravatar Ready
3-Columns
Widget Ready
Logo PSD

Demo
Download
Latest Free WordPress Themes | More Free Themes
AdsPress WordPress Theme
AdsPress

WP 2.5 Gallery Compatible
Adsense Ready
Gravatar Ready
2-Columns
Widget-Ready
Logo PSD

Demo
Download
Latest Free WordPress Themes | More Free Themes
Statement WordPress Theme
Statement

WP 2.5 Gallery Compatible
Quick Tabs
100% Width
3-Columns
Widget-Ready
Logo PSD

Demo
Download
Latest Free WordPress Themes | More Free Themes
Tutorials WordPress Theme
Tutorial Theme

Tutorials Feature
Thumbnails
Bright colors
3-Columns
Widget-Ready
XHTML Compliant

Demo
Download

Posts Tagged ‘Mods’

10 WordPress Hacks to Make your Life Easy

Written by Jai on August 27, 2008 – 5:29 pm - 19,235 views

Displaying Gravatars in comments

To refresh your memory, Gravatars are little user images from Gravatar.com that are displayed against your comments in the theme (if the theme is built to support Gravatars). A lot of WordPress themes are built without the support of Gravatars. So, here is some help for you to add Gravatars in your theme. Open up your comments.php file from the theme folder. Find this piece of code :-

<?php comment_text() ?>

Replace the above code with the following code :-

<div class="gravs">
<?php if (get_bloginfo('version')>=2.5)
echo get_avatar( $comment->comment_author_email, $size = '50', $comment->comment_author_link);?>
<?php comment_text() ?>
</div>
<br clear="all" />

The above code will display the Gravatars. Now let us add some CSS to the style.css file for your theme.

.gravs {margin-top:20px;}
.avatar {float:left; margin-right:5px; margin-bottom:5px; padding:3px; border:1px solid #999999;}

When you check your theme again, you will see the Gravatar images against your comments.
Read more

If you enjoyed this post, make sure you subscribe to my RSS feed!