Simple Way , How to enable gravatar in wordpress blogs?

November 18th, 2008 | by Hideident |

1. Go to /wp-content/themes/themename and open comments.php .
2. Find < ?php comment_text() ?> or comment_text() in comments.php and add the following code before that.


<?php
if ( !empty( $comment->comment_author_email ) ) {
$md5 = md5( $comment->comment_author_email );
$default = urlencode( 'http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=60' );
echo "<img style='float: right; margin-left: 10px;' src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&amp;size=60&amp;default=$default' alt='' />";}
?>

This methode, taken from : http://microblog.ravidreams.net/how-to-enable-gravatar-in-wordpress-blogs/

I appreciate it, because it is very simple, and it is work!

  1. 3 Responses to “Simple Way , How to enable gravatar in wordpress blogs?”

  2. By Q-thrynx on Dec 11, 2008 | Reply

    Opera 9.51Windows XP

    lho? WP gak udah built in ada gravatarnya toh?

  3. By Admin B! Blogger on Dec 26, 2008 | Reply

    Firefox 3.0.4GNU/Linux

    Sudah register di B! Blogger, tapi kok logonya B! Blogger blom dipasang?

    Mau jadi member B! Blogger gak nih??

  4. By Fuad on Feb 4, 2009 | Reply

    Firefox 3.0.5Windows XP

    cara manualnya belum tahu saya, ternyata disini ada :)

Post a Comment