Posts categorized “Wordpress”.

WordPress More Links and rel nofollow

wp-carousel-20

Some people may want to stop Google from following their More… links in wordpress. If that is what you would like to do then adding the following code to your active templates functions.php will accomplish it…

// add rel="nofollow" to more links
function add_nofollow_to_more_links($content)
{
	return preg_replace("@class=\"more-link\"@", "class=\"more-link\" rel=\"nofollow\"", $content);
}
 
add_filter('the_content', 'add_nofollow_to_more_links');