AI Assistant
Notifications
Clear all

[Solved] Handling user avatar with Ultimate Member plugin

3 Posts
2 Users
2 Reactions
3,151 Views
Posts: 6
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@ganeshk)
Active Member
Joined: 6 years ago
[#19777]

Hello,

I use Ultimate Member plugin for Login and Registration which I want instead of WP Foro options.

I have disabled/hide 'Site Profile' option using CSS code and set Replace Author Avatar with Forum Profile Avatar to Yes.

If member upload avatar using forum account section then it is not updating at UM avatar.

UM

2 Replies
Chris
Posts: 3610
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@chris)
Famed Member
Joined: 5 years ago

Hi @ganeshk,

If Replace Author Avatar with Forum Profile Avatar option is enabled, wpForo will use WordPress hooks and replace Blog Post author and Comment author avatar with Forum avatar and this option works correct, it does for what it is created for, however this option won't change Profile System Avatars as they have higher priority on WordPress get_avatar Function.

Solution:

Download Code Snippets plugin.

Go to Dashboard > Snippets > Add New.

Insert the below code in code field:

remove_action( 'get_avatar', 'wpforo_avatar', 10 );
add_filter( 'get_avatar', 'wpforo_avatar', 99999, 5 );

 Select Run snippet everywhere Radio and save the snippet.

Check that the new created snippet is active from Dashboard > Snippets > All Snippets.

 


1 Reply
(@ganeshk)
Joined: 6 years ago

Active Member
Posts: 6
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@chris It solved the problem, Thank you very much! 😀


Share: