Upgraded to WordPress 6.0 and have issues? Please check the hotfix which you need to apply.

Okay
  Public Ticket #1651245
Remove nofollow attributes from post content and comment text
Closed

Comments

  •  1
    Onur tarakci started the conversation

    Hey!

    I want to remove nofollow attributes from post content and comment text. 

    Please help

    Best regards

  •  104
    FlexiPress replied

    Hey Onur,

    You need to add the following code to functions.php file in order to clean up nofollow tag from your post content and comment text:

    function remove_nofollow($string) {
    	$string = str_ireplace(' rel="nofollow"', '', $string);
    	return $string;
    }
    add_filter('the_content', 'remove_nofollow');
    add_filter('comment_text', 'remove_nofollow');

    Best regards,


    FlexiPress Support

    Follow on     Envato     Facebook     Twitter

  •  1
    Onur tarakci replied

    Hey!

    Thank you i hope this will helps but, after adding this to functions.php i see this letter on top of the page.

    Best regards

  •  104
    FlexiPress replied

    Hey Onur,

    Looks that you have added the code after the closing ?> PHP tag. Please make sure to add the code before main <?php tag is closed.

    Best,


    FlexiPress Support

    Follow on     Envato     Facebook     Twitter