Skip to content
Public Ticket #16812

Dofollow and NoFollow link

Conversation thread

PenciDesign Supporter replied

Staff Reply

Hi,

By default, WordPress will be added rel="no-follow ugc" to the comment text link. If you want to remove this, please install Code Snippet Plugin, then create a new snippet with the following content:

function tuyenpc_remove_nofollow($text) {
   $text = preg_replace("/(<a[^>]*[^\\s])(\\s*nofollow ugc\\s*)/i", "$1", $text);
   $text = preg_replace("/(<a[^>]*[^\\s])(\\s*rel=[\\"\\']\\s*[\\"\\'])/i", "$1", $text);
   return $text;
}
add_filter('comment_text', 'tuyenpc_remove_nofollow');

Best Regards,
PenciDesign.

tuyenpc started the conversation

Conversation Start

Hello.

I noticed that soledad themes are setting user-generated links in comments section as nofollow by default. Is there an option in the customizer that allows me to set this section to dofollow?
Thanks

Want to join this conversation or access attachments? Sign in first.