• Resolved thomschuthof

    (@thomschuthof)


    How to to open the footer links in a new tab of the webbrowser? Theme Highstarter has two links in the footer: “Designed by Atanas Yonkov” and “Powered by WordPress”. These links open in the same tab of the browser. By e-mail I asked the designer if it was possible to change this in a way that the links open in a new browser tab. Within 1 day he answered with the following solution:

    Yes, it is definitely possible. You can do that with a few lines of javascript. For this, you first need to install the Simple Custom CSS and JS plugin and then add the following script:

    document.addEventListener(‘DOMContentLoaded’, function() {
    document.querySelectorAll(‘.imprint’).forEach(function(e){
    e.setAttribute(‘target’, ‘_blank’);
    e.setAttribute(‘rel’, ‘noopener’);
    });
    })

    This will open the footer links in a new tab.

    And it works!!

    Thanks a lot Atanas!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Footer links to new browser tab’ is closed to new replies.