Open External Links In A New Window Or Tab With WordPress

Open External Links In A New Window Or Tab With WordPress
Have you ever wondered, or did you need open external links in a new window or tab with wordpress?
Many times when we are writing a new post, we want to add external links that go to other websites, in this case we want the link to open on a new page or tab, since we are going to leave our website, but we want it to remain open.

External links are beneficial for our SEO, Yoast SEO always recommends adding an external link.

if you create a link to another website, the owner may return the favor in the future. This helps websites share visitors with each other. While you may think this will hurt your website, reaching new visitors far outweighs the risks.

Using Gutenberg

Gutenberg is now the default WordPress editor, and we will see how easy it is to add a link and open it in a new tab.

The first thing we are going to do is click on the “link” icon to be able to select the text that we want to convert into a hyperlink.

Open External Links In A New Window Or Tab With WordPress Step 1

Now we write the URL and click on “link settings“.

Open External Links In A New Window Or Tab With WordPress Step 2

Once we have opened the settings, we select the option “Open In New Tab“.

Open External Links In A New Window Or Tab With WordPress Step 3

In this easy way we can create a link that opens in a new tab.

Using Classic Editor

For a few versions of WordPress, by default the Gutenberg block editor is used, to return to the classic editor we have to download a plugin, the classic editor plugin.

Now that we have the classic version of the editor, we will do something similar to the Gutenberg editor. First of all we are going to select the text that we want to convert into hyperlink and click on the “insert/edit link” icon.

Open External Links In A New Window Or Tab With WordPress Step 4

Enter the URL we want to access and click on the “link options” icon.

Open External Links In A New Window Or Tab With WordPress Step 5

A new window will be opened where we can edit or insert a link, we simply have to enter a URL, the link text, and we will check in “Open link in a new tab“.

Open External Links In A New Window Or Tab With WordPress Step 6

Using HTML

We may ever be presented with the option of being able to enter some HTML code, well, if we want our link to open in a new window we will only have to add the following code to our “a” tag target=”_blank”.

<a href="Your URL Here" target="_blank" rel="noopener">External Link</a>

As we have seen, it is very easy to add a hyperlink that opens in a new window or a new tab.

2 replies on “Open External Links In A New Window Or Tab With WordPress”

Leave a Reply

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

Pin It on Pinterest

Shares
Share This