• Resolved Mike1984

    (@mike1984)


    I am unable to make external links in a post nofollow. I have tried doing it manually through the HTML tab and using nofollow plugins, but WordPress keeps stripping the nofollow attribute. What could be causing this?

Viewing 1 replies (of 1 total)
  • Thread Starter Mike1984

    (@mike1984)

    Nevermind, just figured this out myself. Turns out it was my theme removing nofollow. If anyone else has the same problem just go into your themes functions.php file and search for nofollow, then remove anything related to nofollow. The code I removed in my theme was:

    // remove nofollow attribute
    function remove_nofollow($string)
    {
    	$string = str_ireplace(' rel="nofollow"', '', $string);
    	return $string;
    }
    
    add_filter('the_content', 'remove_nofollow');
    add_filter('comment_text', 'remove_nofollow');
Viewing 1 replies (of 1 total)
  • The topic ‘Can't nofollow links’ is closed to new replies.