Remove link from mentioned username in comment  


Devin Shawn
Member Customer
Joined: 2 years ago
Posts: 8
05/02/2019 2:11 am  

Hi wpDiscuz Team,

Can you tell me how I can remove the link from the username that appears when a user is mentioned in a comment? Here's an example on my page

The reason I'd like to remove the link is because all of the members on my website are Subscribers and not Editors or Admin so they don't have any posts. When I click the link of the wpDiscuz mentioned user in the comment, it goes to a blank page with zero posts by that Subscriber.

Thanks for your help! I'm still really loving the plugin.


Support Team Admin
Joined: 1 year ago
Posts: 1729
05/02/2019 2:37 pm  

Hi @devin,

I'm sorry, but there is no option for this purpose. You should add this js code in your current active theme's js file, it'll remove the link from the mentioned username:

jQuery.each(jQuery('.hint'), function () {
var txt = jQuery(this).html();
var cls = jQuery(this).attr('class');
var data = jQuery(this).attr('data-ucm_user_id');
jQuery(this).replaceWith(jQuery('<span></span>').attr('class', cls).attr('data-ucm_user_id', data).html(txt))