Updating Avatar for multiple sources
-
I was setting up a social login plugin (Super Socializer) which allows to load the Social avatars by the way. I did it in the obvious reason to display it with User Menus. Sadly i had to realize that the user avatar was not displayed.
Hopefully I found this useful topic which solved my question in no time.
https://www.ads-software.com/support/topic/avatar-doesnt-display-on-nav-menu/I guess that you should consider changing the code accordingly to the suggestion.
It seem to work for social logins as well as Gravatar images. For some reason the CSS didn’t apply anymore…Here was the solution :
In the plugins/user-menus/includes/classes/menu/items.php file, just locate those lines danieliser pointed out:
case 'avatar': $replace = get_avatar( $current_user, self::$current_item->avatar_size ); break;
and replace them for:
case 'avatar': $replace = get_avatar( $current_user->user_email, 32 ); break;
This worked for me, using ProfileGrid, and this is very similar to the answer provided by user mattyshigh here, but it differs from the way the user ID is pulled from to get the avatar.
Thank you mattyshigh for inspiring me the answer, and danieliser for this awesome plugin and his readiness to help. Cheers to the forum!
- The topic ‘Updating Avatar for multiple sources’ is closed to new replies.