Are you looking to enhance user engagement on your WordPress site by opening external links in a new window or tab? In this comprehensive guide, we will show you how to easily implement this functionality, providing an improved user experience and increasing the time visitors spend on your site.

When you add a link to an external website, your visitors typically leave your site when they click on that link. However, by opening external links in a new window or tab, you can prevent users from navigating away entirely, allowing them to easily return to your site after visiting the external page.

This approach leads to better user engagement and increases the likelihood of users signing up for your newsletter, following you on social media, leaving comments, and making purchases.

WordPress’s block editor (Gutenberg) offers a built-in feature that enables you to open external links in a new tab. Follow these steps to implement this functionality:

  1. Edit the blog post or page where you want to add an external link.
  2. Select the text you want to link and click on the ‘Link’ button (or use the shortcut CTRL+K on Windows or Command+K on Mac).
  3. In the link popup, enter the URL and press Enter.
  4. Toggle the ‘Open in new tab’ option to the On position.

By following these simple steps, your link will open in a new tab when clicked.

Tip: You can further enhance your links by adding title and nofollow attributes to the insert link popup using the Linkilo plugin.

If you are still using the classic editor, you can also open external links in a new tab. Here’s how:

  1. Edit the post or page where you want to add the link.
  2. Select the text you want to link (also known as the anchor text) and click the ‘Insert/edit link’ button.
  3. In the popup, add the external link.
  4. Click on the gear icon next to the link to access the advanced insert link popup.
  5. Check the ‘Open link in a new tab’ option.
  6. Click the ‘Update’ button to save your changes.

With these steps, your link will open in a new tab when clicked.

In some cases, you may need to use HTML code to add a link in WordPress, particularly when using the HTML mode in the block editor or adding a link in a WordPress theme template file. Follow these steps:

<a href="http://yourwebsite.com" target="_blank" rel="noopener">Link Text</a>

Replace ‘example.com’ with the external link URL and ‘Link Text’ with the anchor text you wish to use. The target="_blank" parameter instructs browsers to open the link in a new window or tab.

If you find it time-consuming to manually set the ‘Open in new tab’ option for every external link, you can use a plugin to automate the process. The Linkilo plugin is a popular choice for automatically opening external links in a new window or tab.

To use the plugin, follow these steps:

  1. Install and activate the “Linkilo” plugin.
  2. Go to Settings>>External and click on Open New Window for External Links and click Save.
  3. Note that deactivating the plugin will stop external links from opening in a new window.

Using this plugin eliminates the need to manually set the ‘Open in new tab’ option for each external link.

Conclusion

By implementing these methods, you can enhance the user experience on your WordPress site by opening external links in a new window or tab. Users will have a seamless browsing experience, ensuring they stay engaged with your content and increasing the likelihood of them taking desired actions on your site.