Utilizare Gravatar ca favicon pentru blogul WordPress

4 August 2012

Daca doresti sa folosesti gravatar ca un favicon pe un blog WordPress, este usor de realizat acest truc.  In primul rand, intodu functia urmatoare adaugand adresa mail pe linia trei, apoi lipeste codul in fisierul functions.php




function GravatarAsFavicon() {
	//We need to establish the hashed value of your email address
	$GetTheHash = md5(strtolower(trim('you@yourdomain.com')));
	echo 'https://www.gravatar.com/avatar/' . $GetTheHash . '?s=16';

Odata ce ai facut acest lucru, deschide fisierul header.php din tema si lipeste codul urmator:

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

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.