There is a slight malfunction with get_avatar(). When passing additionnal classes in $args, it is not included, no matter how you pass it (string or array). Whereas it works fine if you disable UM
get_avatar(..., .., ..., ..., array('class' => 'rounded-circle mb-2'));
result with UM
<img class="gravatar avatar avatar-70 um-avatar um-avatar-uploaded" ...
result without UM
<img class="avatar avatar-70 photo rounded-circle mb-2" ...
Thanks alot for the response! I tried replacing the following in class-shortcodes.php:
if ( $usermeta == ‘user_avatar_small’ ) {
$value = get_avatar( um_user(‘ID’),40);
with
if ( $usermeta == ‘user_avatar_small’ ) {
$value = get_avatar( um_user(’rounded-circle mb-2′),40);
and it fixes the issue however the uploaded profile picture doesn’t show, it just shows a default grey ‘mystery man’ icon/avatar. Am I putting it in the wrong location?
Hi @cyhpercase,
What version of the Ultimate member you have installed on your site?
Please make sure to remove /index.php/ from the URL on your site.
Set permalink structure to “postname” in Dashboard -> Settings -> Permalinks.
Check this article on how to remove index.php from the URL and see if it helps.
Regards.
Hello, I am running version 2.0.25
I tried setting permalinks to postname and removing index.php but that didn’t work either. I am using {user_avatar_small} {display_name} and in my front page menu I am still seeing the follwing ICEMAN”HREF=“https://www.yatalt.com/user”>*avatar picture*ICEMAN
Hi!
I am facing the exact same problem as the OP. The profile picture URL seems to be wrong, as no image is displayed. Besides, href is being treated like plain text instead of an a tag attribute.
So what I see in my menu is:
” HREF=”/HOLISTICTRAINERS/USER/” CLASS=”NAV-LINK”> *default plugin avatar*
Any suggestions?
Thanks!
Okay, so I finally figured it out!
For those encountering the same issue (including OP if he hasn’t solved it yet), here’s the trick:
– I inspected the code carefully, and noticed there was a title attribute which was messing everything up. There was HTML code (actually the code from UM that allows the profile picture to display) inside the title tag, and it was unintentionally closing the menu “a” tag, causing the href attribute and everything after it to display on screen.
– I tried to remove the closing characters “/>” in the plugin’s code, and although it worked, it was not perfect (it was adding unnecessary spaces, as the rendered image tag was not closed, if that makes sense).
– Finally, I came up with the solution: to give the menu link a custom title. In the menu section in the WordPress Dashboard, where you add the menu items, you have to enable the title field by checking it in Screen Options > Show advanced menu properties > Title Attribute. Then, you write your title (in my case, I used “{first_name} {last_name} photo”, so the image title matched the user’s full name) and the problem is solved.
After some weeks without success, I found this workaround. However, it would be nice if the plugin (which is awesome, by the way) prevented this issue beforehand, or at least mentioned it in the documentation.