-
Hi there!
it would be nice if someone could help me!
This is my situation:
I am working with wordpress multisite.
Userpro is installed only on one site in the network (mainly to save resources).
Now I would like to output the avatar url of the currently logged in user on another site in the network. As the profile picture is saved in the (global) user meta I should be able to access this data in theory.
But I can’t get it to work.Why do I need this?
I would like to display the avatar of the
currently logged in user using and avoid using the get_avatar function.Any help is very appreciated!
Thank you very much!
What are you trying to do simon? What code did you try already? Can you please hit me on gtalk – thanks! (I’d like to improve this for multisite)
Got it working!! 🙂
using:
<img src="' . $current_user->profilepicture . '" width="32" height="32" alt="" class="modified avatar" />
I can get the user avatar from any site in the network – even on sites were userpro is not installed.
I will try to improve this so it shows the male / female avatar if now custom avatar is uploaded.
Also I will try to write a a small plugin to override the standard get_avatar function on sites in the network, where userpro is not installed.Thank you very much for your reply!! Would it be ok if I hit you on Gtalk tomorrow or thursday?
Will try to come up with some ideas concerning multisite 🙂 Hope I can help you.Best wishes
simon88Hi simon! Sure yo know you’re more than welcome anytime 🙂 Thanks for the snippet.
You must be logged in to reply to this topic.