Remove link from mentioned username in comment  

Devin Shawn
Posts: 8
Joined: 3 years ago

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.


1 Reply
Posts: 3079
Support Team
Joined: 2 years ago

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))