Image may be NSFW.
Clik here to view.Yesterday i was reading a post from my buddy Jym, and many people were interested in knowing how to add nofollow to the links.
So, In this post i’m going to talk about how to add nofollow to links, Adding Dofollow in the comment links and Making blogroll links dofollow.
What is Dofollow & NoFollow?
Do Follow links are links that are and that can be crawled by search engines. No-Follow links are, of course links that won’t be crawled by search engines.
How to add Nofollow to any link
By default your link look like this
<a href="http://www.wpkube.com">WP kube</a>
To make it nofollow, simple add nofollow attribute
<a href="http://www.wpkube.com" rel="nofollow">WP kube</a>
Make blogroll links NoFollow
function no_follow( $links ) {
foreach($links as $link) {
$link->link_rel .= ' nofollow';
$link->link_rel = trim($link->link_rel);
}
return $links;
}
add_filter('get_bookmarks', 'no_follow');
Make Comment links Dofollow
function do_follow($string) {
$string = str_ireplace(' rel="nofollow"', '', $string);
return $string;
}
add_filter('comment_text', 'do_follow');
So what are your thoughts of having nofollow or dofollow links on blogs? What’s your preference in this topic? I Would love to hear your thoughts!
Nofollow to any link?
The post A Short Guide on DoFollow/Nofollow appeared first on WPKube.