favicon image is the one of the important thing for not only wordpress but also every websites. and gravatar image is very familiar to every wordpress users. today i am sharing some codes, which is very useful. with this code you can set gravatar image as your favicon image like this:
for this work please follow this steps given bellow:
* Create a gravatar account and save an image for gravatar image from here with email which is using in your wordpress sites admin email.
1. First go to your wordpress admin panel.
2. Now go to theme editor
3. Now select ‘functions.php’ file.
4. Now copy bellow code and paste and save in your 'functions.php' file.
now refresh your wordpress site and see that, your gravatar is using as your favicon image.
Thanks for visiting my blog and my article.
for this work please follow this steps given bellow:
* Create a gravatar account and save an image for gravatar image from here with email which is using in your wordpress sites admin email.
1. First go to your wordpress admin panel.
2. Now go to theme editor
3. Now select ‘functions.php’ file.
4. Now copy bellow code and paste and save in your 'functions.php' file.
function gravatar_favicon() {PROBLEM COPY CODE? TRY HERE!
$GetTheHash = md5(strtolower(trim(get_bloginfo('admin_email'))));
return 'http://www.gravatar.com/avatar/' . $GetTheHash . '?s=16';
}
function favicon() {
echo '';
}
add_action('wp_head', 'favicon');
now refresh your wordpress site and see that, your gravatar is using as your favicon image.
Thanks for visiting my blog and my article.
0 comments:
Post a Comment
Comments here