Need help with get_avatar ?
-
I want to set a default avatar on my WP 3.21 site but only for authors in the loop.
I do NOT want to effect the default avatar under “Discussion,” so that commenters without images will show mystery man.
I want to do this so that any author that does NOT have a manually uploaded avatar will have a brand logo as their default avatar. Obviously I do not want unknown commenters to have that brand logo to avoid confusion.
In the loop my code is below:
echo get_avatar( get_the_author_id(), $size = '40', $default = 'http://mysite.com/images/icon.jpg' );
The size works, but it does not default to icon.jpg.
Any help will be appreciated. Thanks.
- The topic ‘Need help with get_avatar ?’ is closed to new replies.