As most of us know it is good practice to make all the links that will leave the site to link out, to open a new tab or window so the visitor does not have to leave your site to visit the link. Turns out though, that the standard xHTML tag rel=”external” does actually not work on a WordPress site.
There’s a plugin you can use for this issue that then uses the target=”_blank” or target=”_new” properties, but these don’t actually validate by W3C standards, but there’s an even easier fix, paste a short line of jQuery in the header or your external js file.
$(function(){
jQuery("a[rel*=external]").attr( "target", "_blank" );
});
It will add target=”_blank” on all the rel tag with “external”. It will still be a valid xHTML tag because the DOM was already loaded when we added target=”_blank”.


