Support » Fixing WordPress » How to change the gravatar of an user?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Go to gravatar.com, register with your email address and choose photo to represent you.

    I don’t want to do so.

    I would rather edit the corresponding php file
    -> so anyone know which php file of WP should I work on?

    Thanks for any kind of help!

    You can’t change a gravatar for another person. They’ve set it as their own, and that’s how it’s displayed.

    But… There is hope.

    Looking in the twentyeleven theme there’s one file that you can see – comments.php – and that is what displays comments on your pages. If you follow that through you’ll see that the comments are output from the function wp_list_comments() and that takes a callback of twentyeleven_comment() which has the function get_avatar().

    So, you’ll be able to change them in your sites comments if you modify your themes comments.php file and add in your own callback function for the formatting.

    I’m with @zex2911 on this… you can’t change someone else’s gravatar. That’s personal info. I don’t want yo to change mine nor would you like me to change yours would you?

    Under settings > discussion, you can pick something other than gravatar instead.

    Hi Michael & Christine!

    First of all, the wordpress site I am talking about is my own site and no one else, so I am going to change my own gravatar and not someone else!
    -> so would you mind telling me which php file should I work on to add my own gravatar directly?
    -> I don’t want to edit the twentyeleven themes as I don’t want to do this work again if I change my theme!

    Secondly, if one day I run a public site, I would rather allowing users to upload their own gravatar instead of forcing them to register in another sites which they are not trusted and unfamiliar with!

    Thanks for any kind of help!

    slight change in terminology…

    You cannot change the gravatar – a gravatar is a thing, associated with a service, linking an email to a gravatar account and providing an image.

    You can change the behaviour of your site to use a different avatar, bypassing the gravatar service.

    This would be a theme function (but could be done from a plugin, so that it doesn’t go away if you change themes)

    YOu may want to look for a user upload avatar plugin of some sort, unless you are gung-ho about coding a custom solution.

    http://wordpress.org/extend/plugins/search.php?q=user+avatar
    Something here may help

    Thanks a lot Voodoo!
    -> will try it out!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to change the gravatar of an user?’ is closed to new replies.