Sometimes, you may not have access to your ad delivery network on your website, but the fact they are embedding ads in your pages without the rel=”nofollow” tag is costing your site in SEO. One thing you can do is insert this handy JQuery code in your page footer. All it does is wait for your page to load then it scans all your links for a match unique to the ad network and adds the “rel=’nofollow’ attribute in those matching

 tags.

Simply replace “ad-deliverer/” below to whatever unique part of the path you can use to identify your ad network, such as “doubleclick”.


$(document).ready(){

$("a").each(function(){

href=$(this).attr("href");

if (href.indexOf("ad-deliverer/")>-1){
$(this).attr("rel","nofollow");
}

});

});


Find the line in your child theme’s “comment.php” file where it calls on the function comment_form() and replace that line with this:

<?php comment_form(array('comment_notes_after' => '')); ?>