5ThirtyOne

Derek Punsalan

Media Temple

Point Gravatars to their respective sites

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?

Backblaze unlimited secure online backups Find out what Backblaze can do for your online backups

4 Comments • RSS

  1. Adam says:

    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. Derek says:

    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. Poldo says:

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

  4. Jamie says:

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

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. If you plan on sharing helpful code, please pass it through Postable first. Want other to know who you are? Register a Gravatar.

Syndicate

Subscribe via RSS or Email

Advertisements

9rules network

5THIRTYONE

Public projects

Select project

Something new

Fresh content

Show Latest

Muro – HTML5 drawing tool Check out deviantART's HTML5 drawing tool. Super slick and a joy to work with. Makes you wonder why basic desktop drawing tools *cough* Microsoft Paint *cough* still exist. Link