Forums
Home / Themes and Templates / Always get a default avatar in my comments
(@chacsam)
15 years, 10 months ago
Hi,
Since I have installed the 2.5.1 and installed the advised code, I alwys get the default gravatar displayed. Can anyone help?
The code is in the comments loop after: <?php foreach ($comments as $comment) : ?> And looks like this
<?php foreach ($comments as $comment) : ?>
<div class="gravatar"> <?php if (function_exists('get_avatar')) { echo get_avatar($email, $size='60'); } else { //alternate gravatar code for < 2.5 $grav_url = "http://www.gravatar.com/avatar.php?gravatar_id= " . md5($email) . "&default=" . urlencode($default) . "&size=" . $size; echo "<img src='$grav_url'/>"; } ;?> </div>
Thanks
15 years, 9 months ago
i think you have to try and wait for gravatar.com to update your image, they take there time on doing that, due to server related issues.
http://www.picbi.com
(@transmothra)
15 years, 8 months ago
See here.
In the comment loop, you wanna do this: echo get_avatar( get_comment_author_email(), ’96’, $default = ” );
Hope that helps!
(@chacsam)
15 years, 10 months ago
Hi,
Since I have installed the 2.5.1 and installed the advised code, I alwys get the default gravatar displayed.
Can anyone help?
The code is in the comments loop after:
<?php foreach ($comments as $comment) : ?>
And looks like this
Thanks