1

You want to try something like this (untested): // Nofollow in content $author_id = get_the_author_meta( 'ID' ); add_filter('the_content', 'my_nofollow'); function my_nofollow($content) { //return stripslashes(wp_rel_nofollow($content)); return preg_replace_callback('/<a[^>]+/', 'my_nofollow_callback', $content); } function ...


1

you are my hero. I solved my issue with internal links with your code. I had to modify it because i got many different rel inside my code rel="nofollow nooopener" and rel="nooopener nofollow" so i modify with this: add_filter( 'the_content', 'ex1_the_content_filter' ); function ex1_the_content_filter($content) { // finds all links in your content with ...


Only top voted, non community-wiki answers of a minimum length are eligible