How to Remove NoFollow From Your WP Posts

how-to-remove-nofollow-from-your-wp-posts

There are several plugins that will automatically remove nofollow from comments and author’s names, but I wanted to remove the default nofollow attribute only within my posts. I was not able to find any plugins for that, but luckily I found this article from digwp with a workaround.

How to remove nofollow attribute from post content only

To clean up your post content, simply add the following code to your active theme’s functions.php file:

function remove_nofollow($string) {

$string = str_ireplace('', '', $string);

return $string;

}

 

add_filter('the_content', 'remove_nofollow');

That’s all there is to it — no further editing required. Once in place, this function will filter all post content and remove any instances of rel=”nofollow”. Note that if you have some posts about nofollow, this function will remove rel=”nofollow” from your code examples as well.

I hope this will help you in the future!

Pitstop Media offers ROI based internet marketing services. If you need help with your search engine optimization projects or with pay per click management and/or PPC optimization please contact us for a free, no obligation quote. We’ve helped companies rank on the first page of Google in a short period of time for highly competitive terms, and we’ve reduced paid advertising cost by as much as 48% while increased AdWords conversion rates by as much as 410% . Let us rank your website on the first page, too!

Rate this post!

VN:F [1.9.22_1171]
Rating: 8.6/10 (5 votes cast)
VN:F [1.9.22_1171]
Rating: +3 (from 3 votes)
How to Remove NoFollow From Your WP Posts, 8.6 out of 10 based on 5 ratings

About 

Traian is Founder and Director of Search Marketing at Pitstop Media Inc. He has more than 11 years experience in helping small and medium businesses generate and convert organic traffic from search engines. Connect with Traian on Google+

 

One Response to “How to Remove NoFollow From Your WP Posts”

  1. Accessoire “New-Look-Paris” Ensemble Laisse+Collier Clouté Special Staffi 30mm De Large | Le Collier de Dressage Pour Chien said:

    Jan 14, 12 at 6:30 am

    […] How to Remove NoFollow From Your WP Posts […]