get_avatar doesn't work on my theme
-
Hello, i have discovered get_avatar function that creates different avatars for every commenters of a post.
I used it in my old theme (Movie World) but it doesn’t work.
I’m sure that is a theme matter because i can see the avatars on my dashboard (admin side):
http://img190.imageshack.us/img190/595/bachecay.png
Besides if i use another theme (i.e. Twenty Ten 1.1) it works well, with no problems.In my current theme (Movie World) the comments look like this:
http://img831.imageshack.us/img831/370/primas.png
Its comments.php file has the following code:<!-- Gravatar -->
<img src="http://www.gravatar.com/avatar.php?gravatar_id=<?php echo md5(get_comment_author_email()) ?>&size=50&default=<?php echo urlencode(get_bloginfo('template_directory').'/images/default-gravatar.jpg') ?>" width="50" height="50" alt=" " class="gravatar" align="left" /><h3 class="comment-title"><?php comment_author_link() ?> <?php _e('ha scritto'); ?></h3>
I’ve tried to edit that code in this way:
<!-- Gravatar -->
<img src="<?php echo get_avatar( $comment, 50 ); ?>" width="50" height="50" alt=" " class="gravatar" align="left" /><h3 class="comment-title"><?php comment_author_link() ?> <?php _e('ha scritto'); ?></h3>
But i get this:
http://img844.imageshack.us/img844/8079/dopoy.pngWhat could be the problem?
Thank you.
The topic ‘get_avatar doesn't work on my theme’ is closed to new replies.