Forums

Do Follow On Specific Post (1 post)

  1. PinoyTechHub
    Member
    Posted 4 months ago #

    Anyone? Please help.

    I noticed that on wp-includes/formatting.php the external links are now added with an attribute of rel="nofollow" tag as a result even if i don't include nofollow on a link on my post it automatically adds it.

    As an alternative, I added the following function code on my theme's function.php:

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

    The problem now is all the other posts of mine are all dofollow now. Can anyone help me to correct this?

    My main objective is to allow dofollow on some of my posts.

Reply

You must log in to post.

About this Topic