Place this code just under the <head> tag in your template.
<script type='text/javascript'>
//<![CDATA[
function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=anchors.length-1; i>=0; i--) {
var anchor = anchors[i];
if (anchor.href && anchor.href.substr(0,Number) != "Homepage URL")
anchor.target = "_blank";
}
}
window.onload = externalLinks;
//]]>
</script>
//<![CDATA[
function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=anchors.length-1; i>=0; i--) {
var anchor = anchors[i];
if (anchor.href && anchor.href.substr(0,Number) != "Homepage URL")
anchor.target = "_blank";
}
}
window.onload = externalLinks;
//]]>
</script>
The red text needs to be the link to your homepage (exactly).
The blue text should be the number of the characters (including http:// and .com) that you just placed in for the red text.
2 comments:
I am probably missing something - I know how to open in a New Window in or from the post itself if required but how to do this in the side panel using: Configure Link List?
In this case - if you look - it is URL of Canadian Company of Pilgrims.
Thanks.
I could go over how to do that but my buddy has a blog with a tutorial that covers opening link list in a new window. Click here to see it and scroll to the bottom.
Post a Comment
Please don't post hyperlinked text within the comment box! It will not be published and you will be marked as spam.