How to change the default Avatar
I want to use a different default Avatar for those users who post that don't use Gravatar. The default is currently this image
http://www.whatsmytruth.com/hockey/w...o-gravatar.gif and I want to change it to something else (another image). I have tried changing the comments-paged.php legacy.comments.php files that are pointing to the file no-gravatar.gif to my new file but still no go. Also I have placed the new file in the wp-content/themes/atahualpa332/images folder where the no-gravatar.gif file is and even tried naming the new file to no-gravatar.gif and nothing seems to work. It always seems to use the default image that came with Atahualpa. Users using Gravatars works fine. I am using version 3.3.2. Any help would be appreciated. Thanks http://www.whatsmytruth.com/hockey |
If you replaced no-gravatar.gif then it should work. Perhaps a WP Cache 2 / WP Super Cache / Browser Cache issue, or you did not successfully overwrite the existing no-gravatar.gif
|
here is my code in the comments-paged.php file
$default = urlencode(get_bloginfo('template_directory') . '/images/hockeypuck.jpg'); as you can see I changed it to hockeypuck.jpg here is my code in the legacy.comments.php file $default = urlencode(get_bloginfo('template_directory') . '/images/hockeypuck.jpg'); and hockeypuck.jpg is in the images folder where the no-gravatar.gif file is. On my dashboard under settings/discussion it lists 6 gravatars Default Avatar For users without a custom avatar of their own, you can either display a generic logo or a generated one based on their e-mail address. Mystery Man Blank Gravatar Logo Identicon Wavatar MonsterID I have selected Mystery Man on my dashboard under settings/discussion- which still has the old picture there too. Which should use the image file no-gravatar.gif (now changed to hockeypuck.jpg). I have cleared out my browser cache and have refreshed the page several times and my test messages still shows Mystery Man image...getting very frustrated UPDATE: If I right click on the picture and do a view image on a comment, it brings up a new page with this URL http://www.gravatar.com/avatar/ad516...bb6523536?s=60 so somewhere in the code it is saying to use the Mystery Man from Gravatar and not the one from the image folder? Am I correct on this assumption? |
The theme's own gravatar functions is only used in WP versions without built in gravatar support. Edit functions/bfa_recent_comments.php
<?php if ($args['avatar_size'] != 0) echo get_avatar( $comment, $args['avatar_size'] ); ?> to <?php if ($args['avatar_size'] != 0) echo get_avatar( $comment, $args['avatar_size'], 'URL_of_AVATAR_IMAGE' ); ?> |
U rock! U are the man. I looked in the bfa_recent_comments.php file for the code you mentioned and couldn't find it. I then kept looking through the other php files in the Functions folder and found bfa_comment_walker.php and it was in there. Made the changes you suggested and works like a charm!
|
You're using an older version then, bfa_walker_comments.php doesn't exist anymore in 3.3.3 I'll make this an option in 3.3.4
|
All times are GMT -6. The time now is 04:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.