[resolved] Remove rel="nofollow" from comments links (3 posts)

  1. J_25
    Posted 6 years ago #

    Hello again!

    I just set up a new wp blog(v 2.7.1) and I'd like to:

    1. add target="_blank" attribute to each link found in the comments
    2. remove the rel="nofollow" from every link from the comments

    The reason for this is that I'd like to have a do-follow blog :)

    After some search I was able to edit the links for the comment authors and remove the nofollow attribute and add the target _blank, but I just couldn't find where the links displayed in comments are...

    Can someone help me pointing me into the right direction?

    Thank you in advance,

  2. Samuel B
    Posted 6 years ago #

    the only file of I know it is in is

    around line 1465 look for

    function wp_rel_nofollow_callback( $matches ) {
    	$text = $matches[1];
    	$text = str_replace(array(' rel="nofollow"', " rel='nofollow'"), '', $text);
    	return "<a $text rel=\"nofollow\">";

    easier to just use a plugin

  3. J_25
    Posted 6 years ago #

    Thank you sambol! Thank you very much :)

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.