Skip to content
WJunction - Webmaster Forum

[Tutorial] Open All Links In New Tab (Internal Or External) In Your Blog

Status
Not open for further replies.
With Due Respect, I Have Seen Many People (With wordpress Blog) Facing Problem with this,As we have many wordpress External Links New tab open scripts or plugin but what about internal links? so just setup This New thread to share how this problem can be solved In 3 Easy Steps.

Follow Simple 3 Steps As Below :-

1.Login To Your Admin Panel.
2.In Header Of Your Page (.php,.html) Do Add Following Code:-

<script language=javascript>

function externalLinks()
{
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++)
{
var anchor = anchors;
if(anchor.getAttribute("href"))
anchor.target = "_blank";
}
}
window.onload = externalLinks;

</script>


3.And You Are Done !.

Reply Here below if you have any problem regarding above, Thanks.
 
Status
Not open for further replies.

About the author

V
Banned · Joined
285
Messages
51
Reactions
28
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom