If you run a business website using WordPress, you may want to provide external links to your readers that take them to other sites for further information or related products. custom wordpress development However, you may also want to keep your site open in the original window or tab, so that your readers can easily return to your site after viewing the external content.
Fortunately, opening external links in a new window or tab is a simple task with WordPress. In this blog, we’ll show you how to do it in just a few easy steps.
Install a Plugin
The easiest way to open external links in a new window or tab with a WordPress business site is by using a plugin. custom wordpress website development services There are many plugins available for this purpose, but one of the most popular is the “Open External Links in New Window/Tab” plugin.
To install the plugin, go to your WordPress dashboard and click on “Plugins” from the menu on the left-hand side.
Configure the Plugin
After you have installed the plugin, you can configure it to your liking. To do this, click on “Settings” from the menu on the left-hand side of your WordPress dashboard and then click on “Open External Links.”
wordpress service provider Here, you can choose whether you want external links to open in a new window or tab. wordpress plugin development services You can also choose which types of links you want to open externally, such as links to other sites, PDF files, or email addresses.
Manually Add Target=”_blank”
If you don’t want to use a plugin, you can also manually add target=”_blank” to your external links. This HTML attribute tells the browser to open the link in a new window or tab.
To do this, you will need to edit the code of your website. To access your website’s code, go to your WordPress dashboard and click on “Appearance” from the menu on the left-hand side. Then, click on “Editor.”
In the Editor, you will see a list of files on the right-hand side. Look for the file that contains the code for your website’s pages, such as “page.php” or “single.php.” Click on this file to open it.
Once you have opened the file, look for the section of code that contains your external links. bespoke wordpress development This will likely be a section that contains HTML code for links, such as <a href=”http://example.com“>Example</a>.
To add target=”_blank” to these links, simply add it within the <a> tag, like this: <a href=”http://example.com” target=”_blank”>Example</a>.
Use a Page Builder
If you use a page builders plugin, such as Elementor or Beaver Builder, you can easily add external links that open in a new window or tab. wordpress theme development custom wordpress development services These page builders typically have a “Link” or “Button” element that allows you to add links to your pages or posts.
To add an external link that opens in a new window or tab, simply select the “Link” or “Button” element and enter the URL of the external link. wordpress development services Then, look for the “Available connection in new window/account” choice and set it.
Opening external links in a new window or tab is an essential feature for any WordPress business site. By default, WordPress does not offer this option, but with the help of various methods, it can be achieved easily. You can choose from using a plugin, adding HTML code to your links, or modifying your theme’s functions.php file.
Each method has its advantages and disadvantages, so you need to select the one that fits your needs best. Whatever method you choose, remember that opening external links in a new window or tab can enhance the user experience on your site and keep visitors engaged longer.
If you are looking for custom web application development services and want to Open External Links in a New Window or Tab on your site with wordpress then contact 8therate.