Help with gravatar plugin
-
I installed the Gravatar plugin, and I don’t know where to put the code for it. =/
I’m using the theme ‘Retrospotive’ and the comments code looks like this:<li id="comment-<?php comment_ID() ?>" class="<?php echo $commentsAlternate; ?><?php if($isByAuthor ) { echo ' authorcomment';} ?>"><cite><?php comment_author_link() ?></cite><?php comment_text() ?>
<small><?php comment_type(__('Comment'), __('Trackback'), __('Pingback')); ?> <?php _e('left'); ?> on <?php comment_date() ?> @ "><?php comment_time() ?> <?php edit_comment_link(__("Edit This"), ' |'); ?></small>
And the gravatar code is this:
<?php foreach ($comments as $comment) :
if (function_exists('gravatar')) {
if ('' != get_comment_author_url()) {
echo "comment_author_url' title='Visit $comment->comment_author'>";
} else {
echo "";
}
echo "<img src='";
if ('' == $comment->comment_type) {
echo gravatar($comment->comment_author_email);
} elseif ( ('trackback' == $comment->comment_type) || ('pingback' == $comment->comment_type) ) {
echo gravatar($comment->comment_author_url);
}
echo "' alt='a gravatar' class='gravatar' />";
}
?>
The topic ‘Help with gravatar plugin’ is closed to new replies.