Notifications
Clear all

Comment author profile url

5 Posts
2 Users
0 Likes
2,505 Views
(@angel_devoeted)
New Member
Joined: 6 years ago
Posts: 4
Topic starter  

Hello,

I have an issue with the profile url. I am using buddypress for my users profile pages and i used the buddypress integration code un my child theme's funtcion.php .

The profile url seemed to work fine but then i noticed that althought the gravatar athor link was linking to my users buddypress profile, the display name of the user was linking to my users url link(some of my users register via social networks to my site).

This issue causes many troubles because the users social profile links must be hidden from the public.

2
1

 


   
Quote
Arina
(@arina)
Support Team
Joined: 10 years ago
Posts: 101
 

Hi @angel_devoeted,

This is not a bug, it is wpDiscuz working logic. Gravatar author link is linked to the users BuddyPress profile and the display name of the user is link to the users URL link.

Please use the following CSS code to hide the users url link, put it in Dashboard > Comments > Settings > Styling > "Custom CSS Code" textarea: 

#wpcomm .wc-comment-author a{
pointer-events: none;
cursor: default;
}

   
ReplyQuote
(@angel_devoeted)
New Member
Joined: 6 years ago
Posts: 4
Topic starter  

Hi Arina,

The css is a simple and easy solution but it's kind of unsafe if you want to protect the privacy of your users.

I mean that anyone with a simple inspect element or by viewing the page source  has access to  user's url link.


   
ReplyQuote
Arina
(@arina)
Support Team
Joined: 10 years ago
Posts: 101
 

@angel_devoeted,

put the following code in your current active theme's functions.php file. 

if (!function_exists('hide_user_url')) {
add_filter('wpdiscuz_author_link_attributes', 'hide_user_url', 10, 1);
function hide_user_url($url_attribtues) {
if ($url_attribtues && isset($url_attribtues['href'])) {
unset($url_attribtues['href']);
}
return $url_attribtues;
}
}

   
ReplyQuote
(@angel_devoeted)
New Member
Joined: 6 years ago
Posts: 4
Topic starter  

@arina,

This works perfectly!

Thank you very much!


   
ReplyQuote
Share:
Scroll to top