5ThirtyOne



Point Gravatars to their respective sites

May 11th 2006
4 Comments
respond
trackback

Paul Stamatiou does the grunt and provides a little code snippet for improving a Gravatar enabled blog. By default, the gravatar plugin redirects clicks to Gravatar.com. A simple copy n’ paste will have Gravatars on your site redirected to their respective authors page.

<?php if (function_exists('gravatar')) { ?><a href="<?php comment_author_url(); ?>" title="<?php comment_author(); ?>'s website"><img src="<?php gravatar("X", 32, ""); ?>" class="gravatar" alt="Gravatar Icon" /></a><?php } ?>

The key calls being comment_author_url and comment_author. Whodathunk?



4 Comments

  1. This is something that has always bothered me, if there is a mug shot of some one or a picture they have chosen to represent themselves why not click it to find out more.

    I was never sure if there was a hidden reason for every gravatar to point back to gravatar’s, so i never changed anything and carried on my sheep like existance.

  2. It used to bother me as well, until I decided to remove the link because it seemed a bit repetitive to have so many different links pointing back to Gravatar. ET phone home I guess.

  3. Thank you for opening my eyes, Derek. This is really helpful.

  4. Thank you for this little fix- it woks wonderfully :)

Incoming Links



Leave a Reply

Comments may be held for moderation. If your comment does not appear immediately, do not repost. I reserve the right to remove any inappropriate or off-topic comments. Please use the forum if your comment is not appropriate for the current article.

Flickr Visit »

  • Vin Pearl Resort
  • Bandaid burn
  • Saigon strip
  • Beach
  • Adidogs
  • Lights
  • KW's fully settled
  • Friday at the office
  • Original Trung Nguyen
  • Roof
  • Guards
  • Statue
  • Restoration
  • Grand Palace
  • Steep
  • Sylvia
  • Gold
  • Detail
  • Peeking
  • Tiles