Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there a plugin that lets me change an avatar of a comment? Since I can edit comments, is it possible to add avatars as well?

I don't have registered user on my blog, only guests and those who connect to comments via Facebook. Those that use FB authorization have an avatar but those who comment without one don't. I would like to be able to manually change an avatar of individual comments.

share|improve this question
1  
I don't think it's possible to selectively change avatars because they are generated from emails, for which you are not aware if they have a avatar associated –  onetrickpony Dec 15 '11 at 20:12

1 Answer 1

You could use the auto generated Gravatar options in the back end which will randomly assign an "avatar" to those who do not have one. You will find this when you go to your WordPress back-end Settings > Discussion and scroll down to the bottom.

Or you can have a custom avatar replacement for those who do not have one however this will not be random but will ad a custom a default avatar to your site. You can do this by simply putting this in your comments.php file via your theme where you would be putting your avatars:

<?php echo get_avatar( $comment, 96, get_bloginfo('template_directory') . '/images/avatar.jpg' ); ?>

Just make sure you have an image in your images folder called avatar.jpg . By the way 96 is the size of the avatar in pixels. You can adjust the size by making the number larger (for a larger avatar) or smaller.

I hope this helps. :)


EDIT:

I am not sure if this is something you might be interested because it allows people to upload their own avatars and is a Gravatar alternative. However this plugin does say that it allows avatar control. I have not tried it but you might want to give this a go:

http://wordpress.org/extend/plugins/add-local-avatar/

share|improve this answer
    
Thanks, I know that I can use custom avatar by default but I was wondering if I there was a plugin that enables me to change an avatar on comment basis so that I can change each and every avatar in comments. –  John Doe Dec 16 '11 at 10:48
    
@rlesko I made an edit to my answer above. You might want to check out the plugin I have found. –  Nicole Dec 16 '11 at 14:36
1  
Generally, to change per-user data, you need to modify user meta data - and in order to have user meta data to modify, you need to have registered Users. With anonymous users, you're pretty much stuck with using a default avatar, or else using an email address-based avatar (Gravatar, or one of the generated avatars). –  Chip Bennett Dec 16 '11 at 16:53
    
@rlesko I agree here with Chip. He is correct. –  Nicole Dec 16 '11 at 20:06
    
I believe there is a way to change the avatar for each comment as it is possible to edit comment content. When you edit a comment, you can change author's name, email, URL and an actual comment so I don't see why an avatar couldn't be changed. –  John Doe Dec 16 '11 at 21:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.