WordPress.org

Ready to get started?Download WordPress

Forums

Do Follow On Specific Post (1 post)

  1. PinoyTechHub
    Member
    Posted 2 years 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.

Topic Closed

This topic has been closed to new replies.

About this Topic