How to open External links in New tab or window in WordPress

How To Open All External Links In A New Window On Your WordPress Site

If you are wondering how to make all or specific external links from your website to open in a new tab, you have come to the right place. We are going to achieve this functionality in your WordPress site by making use of the Open external links in a new window plugin.

Unlike other plugins promising similar functionality, this plugin produces code which is strictly compliant with XHTML and is also optimized for search engines. This is achieved by making use of JavaScript’s window.open()- function.

Most of the other plugins perform the same operation in a non XHTML compliant way by altering the target parameter. Moreover, all the links are handled at the client-side instead of server-side. This difference in how the links are managed allows the search engine crawlers to follow the links properly. And in case the browser does not support JavaScript, the plugin simply remains inactive instead of throwing up errors.

Steps to Open All External Links in a New Window on WordPress

Step 1 – Install and activate the Open external links in a new window (by Kristian Risager Larsen) plugin from the WordPress.org plugin repository.

Step 2 – Once the plugin is activated, it works out of the box and no further configuration is needed.

Step 3 – But in case you want to perform additional configuration, you can do so by opening the Settings–>External Links page.

Open external links in new tab settings

Step 4 – If you add any parameters in the above screen, don’t forget to save changes using the button present at the bottom. That’s it – now the plugin is fully configured.

Conclusion

Thus I hope this article helped you in learning how to open external (outbound) links in a new tab in WordPress. If you liked this post, you may also want to see my post on how to add Facebook-like reactions feature to posts in WordPress.

5 thoughts on “How To Open All External Links In A New Window On Your WordPress Site

  1. This plugin will not work on my affiliate / external links that I have already in place. Can’t see that I need to do anything in setup except Activate, and it’s activated.
    Any suggestions?

    Thank you!

    1. Hey Kimberly, it’s should work just fine out of the box. If it isn’t working for you, try clearing your cache files and test the site in an incognito window or a new browser. Also make sure JavaScript is enabled in your browser.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.