Gravatar as Favicon

If you’ve seen how Tumblr uses the blog author’s Gravatar as the blog favicon and want to replicate that in WordPress, simply paste this into your functions.php file.

And then, in the <head> of your header.php, paste the following:

&lt;link rel="shortcut icon" href="<?php GravatarAsFavicon(); ?>" />

If you want to use the same function to grab the apple-touch-icon all you need to do is omit the ‘?s=16’, and add in another link in your <head>:

&lt;link rel="shortcut icon" href="<?php GravatarAsFavicon(); ?>" />
&lt;link rel="apple-touch-icon" href="<?php GravatarAsFavicon(); ?>">

Comments  Leave a Reply

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!