I really love your new design and just wanted to know which technique you use to create these coloured avatars with a simple letter of the name in it?
Do you use a plugin or would you share it?
It’s perfect!
Hi Nico,
We made a hook into get_avatar filter of WordPress, replace the default avatar ,when user didn’t have gravatar, by a html div with first character of their display name inside this box then make it by a colorful style with a bit of css. You can use this code here as a reference: https://gist.github.com/bighug/84176129be47c780e78c
Regards
Is there a possibilty to use this in a standard theme or create a new plugin out of this snippet? I am not really familiar with programming so I ask..
I would really like a plugin for this also – looks great
Please download the above file.
Then copy and paste it into your theme folder. And add the following line of code into your functions.php file:
include_once trailingslashit(get_template_directory()) . ‘dw_avatar.php’;
Appreciate the response. I tried to add in that code into the functions.php file and also uploaded the referenced php file.
It show it on the web page but does not replace the actual avatar which is strange.
Do you think its a theme thing? my website is http://www.itengineerjobs.co.uk im using a wordpress buddy theme.
thanks,
adnan
The feature only replaces avatar for accounts that don’t have Gravatar before, if they already have or once had, the feature will not work. Can you try with a fresh new account to see if it works?
@BigHug “Whoops.
We seem to have missed the gist of that gist you were looking for.”
@BigHug
is the gist still available? The link is no longer available..
@BigHug re-add?
Please login or Register to submit your answer