Skip to content

Instantly share code, notes, and snippets.

@jasontucker
Created September 20, 2012 18:09
Show Gist options
  • Save jasontucker/3757446 to your computer and use it in GitHub Desktop.
Save jasontucker/3757446 to your computer and use it in GitHub Desktop.
How to use your Gravatar as a favicon
//saw this on WpRecipes.com
function GravatarAsFavicon() {
//We need to establish the hashed value of your email address
$GetTheHash = md5(strtolower(trim('you@yourdomain.com')));
echo 'http://www.gravatar.com/avatar/' . $GetTheHash . '?s=16';
}
//in the header.php use this:
<link rel="shortcut icon" href="<?php GravatarAsFavicon(); ?>" />
<link rel="apple-touch-icon" href="<?php GravatarAsFavicon(); ?>">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment