Greetings. We would like to open our homepage and page links (simply all post titles and links) open in new tab. There should be a way to do this, we can do it in external links, but we want our internal links to open in new tabs as well. How it can be managed?
Hi,
Now, depends on what kind of page links you want to be opened in a new window. So, if you will check our TD Composer, you will see that some builder elements has the following option here -> https://www.screencast.com/t/TnzLgtfd which allows you to open the page in a new tab. You need to provide more details about what kind of links you want to open in a new tab so I can provide a more accurate response.
If you want to do this, you should edit the theme core files and add the target_ blank attribute like this guide -> https://www.w3schools.com/tags/att_a_target.asp If you are not aware of the steps which are needed to take in this case, please consider hiring a freelancer/developer to help you.
Thanks for your understanding!
Hello. We actually found a function to do this, yet it opens literally every link on the website in new tab, which is this:
<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[i];
if(anchor.getAttribute("href"))
anchor.target = "_blank";
}
}
window.onload = externalLinks;
</script>
We just want our homepage article links to open in new tab, which means that our block links. We use only h3’s in our articles, so is there any addition can we make to this script to make it happen? Or is there another way?
Our website to test: birgun.net
Thank you
-
This reply was modified 7 years by
hakankenandemir.
-
This reply was modified 7 years by
hakankenandemir.
Hi,
That is not possible with a theme setting, the modules that display posts do not have such a capability unfortunately. All the theme modules use this function for the title
– https://forum.tagdiv.com/topic/open-post-in-new-window/
You could add the target property there but it will affect all the titles in all modules.
Thanks