How To Open External Links In A New Window/Tab In WordPress?

When you want to make it convenient for your website visitors to access external links from your WordPress site, you can set up your links to open in a new window or tab. This ensures that your site remains open in the original tab, providing a better user experience. Here’s how to achieve this in WordPress.

Method 1: Using the Block Editor (Gutenberg)

If you’re using the Gutenberg Block Editor in WordPress, you can easily configure external links to open in a new tab. Follow these steps:

  • Edit Your Post or Page: Open the post or page where you want to add an external link.
  • Add or Edit a Link: Select the text or element where you want to insert an external link. Click the link icon in the toolbar or use the keyboard shortcut Ctrl+K (or Cmd+K on Mac) to open the link dialog.
  • Enter the URL: In the link dialog, enter the URL of the external website you want to link to.
  • Open in New Tab: Click on the “Open in New Tab” option. This checkbox is usually located within the link dialog and is labeled differently depending on your WordPress version.
  • Insert the Link: After you’ve entered the URL and checked the “Open in New Tab” option, click the “Apply” or “Insert” button to create the link.
  • Update Your Post: Make any other necessary edits to your post or page. Click the “Update” button to save your changes.

Now, when visitors click on the external link on your WordPress site, it will open in a new tab or window, keeping your site accessible in the original tab.

Read: How To Add GA4 Site Annotations And Notes In WordPress

Method 2: Using Classic Editor

If you’re using the Classic Editor (TinyMCE) in WordPress, the process is a bit different. Here’s how to open external links in a new window or tab:

  • Edit Your Post or Page: Open the post or page where you want to add an external link.
  • Add or Edit a Link: Select the text or element where you want to insert an external link. Click the “Insert/edit link” button in the toolbar.
  • Enter the URL: In the link dialog, enter the URL of the external website you want to link to.
  • Open in New Tab: Click on the “Open link in a new window/tab” checkbox. This option might be labeled differently depending on your WordPress version.
  • Insert the Link: After you’ve entered the URL and checked the “Open in New Tab” option, click the “Add Link” or “Update” button to create the link.
  • Update Your Post: Make any other necessary edits to your post or page. Click the “Update” button to save your changes.

By following these steps, external links in your content will open in a new tab or window when visitors click on them.

Conclusion

It’s essential to use this feature judiciously. While it provides a more seamless user experience when accessing external content, opening too many links in new tabs or windows can be overwhelming for users. Use it for external links, especially those that take users away from your site. However, consider the user experience and avoid overusing it for internal links within your site.

Leave a Reply

Your email address will not be published. Required fields are marked *