How to open all external links in New tab

How to open all external links in New tab


How to open all external link of blogger to new tab 

To open all external links in new tabs in Blogger, you can follow these steps:


1. Go to your Blogger dashboard and select the blog you want to edit.

2. Click on the "Theme" section in the left sidebar and then click on "Edit HTML."

3. Before making any changes, it is always a good idea to back up your template. Click on "Download full template" and save it to your computer.

4. In the HTML code, search for `</body>` tag using CTRL + F and paste the following code just above it:

5. Dont forget to chenge example.com with your domain name without https 

code for new tab opening

 
  <script type='text/javascript'>
// <![CDATA[
function externalLinks() {
 for(var c = document.getElementsByTagName("a"), a = 0;a < c.length;a++) {
  var b = c[a];
  b.getAttribute("href") && b.hostname !== location.hostname && (b.target = "_blank", b.rel = "nofollow")
 }
}
externalLinks();
// ]]>
</script>

  

Last word

In this post we will provided information about How to open all external links in New tab , if you like this post then share with your friends and iff you have any queries then join our telegram groups for more informative materials bicouse most of tips provided only on telegram chenall ,your favourite DK technozone

Next Post Previous Post
No Comment
Add Comment
comment url