Support » Fixing WordPress » Gravatar when my blog pingsback?

  • When my blog automatically does a pingback to a site that uses gravatars, something generic appears, unlike if I were to instead post a comment, in which case, my Gravatar gets used.

    Is there anyway I can setup a Gravatar account for WordPress’s pingbacks and make WordPress post pingbacks using the corresponding information?

Viewing 7 replies - 1 through 7 (of 7 total)
  • maybe what you want is to use favatars for pingbacks – since they don’t provide an email address to be used with a gravatar, favatars will pull the website’s favicon, using the supplied web link.

    In case you don’t already know, the favicon is the icon you see next to the web address in your browser. Look at the address line now – you’ll see the wordpress logo up there.

    people use them for their comments too – but you could easily only use them for pingbacks, and keep using gravatars for comments.

    Reading this back, I think I misunderstood your intention… you want a gravatar to appear for YOUR pingbacks on ANOTHER blog, right?

    Well, you can’t do that. That’s up to the other person.

    I think that can be accomplished by editing the wp-trackback.php file in the root. Find $comment_author_email and enter your email there. I don’t know whether it will work or not, but doesn’t hurt to try that’s for sure. 🙂

    (not tested)

    haochi, that’s what i figured. if i can change wordpress’s settings to post a pingback with my name and eMail address, then my gravatar will automatically show up (because when the OTHER blog loads, it will think that i have personally made the pingback, and thus retrieve my gravatar).

    make sense? i’ll poke around the wp-trackback.php file and see what i can pull apart.

    thanks all.

    wow. i can’t believe i figured this out!

    to make YOUR gravatar appear on the blog you’re pinging, you need to do this:

    1) open xmlrpc.php

    2) find the following code:

    $comment_post_ID = (int) $post_ID;
    $comment_author = $title;
    $comment_author_url = $pagelinkedfrom;
    $comment_content = $context;
    $comment_type = 'pingback';

    3) under the line $comment_author = $title;, insert:

    $comment_author_email = '';

    obviously replace “” with the eMail addressed you used to register your gravatar.

    4) upload and replace the xmlrpc.php in the root of your blog directory.

    that’s it! Now when your blog sends a pingback, your gravatar will appear with the pingback!

    thanks again haochi for reminding me of the $comment_author_email variable.

    I lied! One more step:

    5) Find the line:

    $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_content', 'comment_type');

    After ‘comment_author’ add:


    Don’t forget to separate with a comma and a space.

    Gravatars work by referencing the registered eMail address. This additional code posts the eMail address along with the pingback. I have no idea how it all works and I’m surprised this solution works at all, but I’m not going to question a good thing!


    ahh interesting that you can make YOUR wordpress provide an email address to the other blog, by hacking your xmlrpc.

    good to know!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Gravatar when my blog pingsback?’ is closed to new replies.