Enhance User Engagement: How to Open External Links in a New Window or Tab in WordPress

Date:

Share post:

How to Enhance User Engagement: Opening External Links in New Windows or Tabs on WordPress

Enhancing user engagement is crucial for the success of any WordPress website. One effective strategy is to open external links in new windows or tabs. This allows visitors to explore external content while keeping them on your website. In this comprehensive guide, we will explain how to easily open external links in new windows or tabs on your WordPress site.

The Benefits of Opening External Links in New Windows or Tabs

By default, when users click on an external link on your site, they are directed away from your website. This may cause them to forget about your site altogether. Opening external links in new windows or tabs enables visitors to easily return to your website, resulting in increased user engagement, page views, and conversion rates.

Using the WordPress Block Editor

If you are using the WordPress block editor, opening external links in new tabs is incredibly simple. All you need to do is select the desired text to be linked, click the ‘Link’ button, enter the link URL, and press ‘Enter’. To open the link in a new tab, toggle the ‘Open in new tab’ option.

Using the Classic Editor

For those using the classic editor, the process is equally straightforward. Edit the post or page, select the text to be linked, click the ‘Insert/edit link’ button, and add your link. To open the link in a new tab, access the advanced insert link popup by clicking on the gear icon next to the link. Check the ‘Open link in a new tab’ option, and click ‘Update’ to save the link.

Using HTML Code

In some cases, you may need to add a link using HTML code, such as in the HTML mode of the block editor or in a WordPress theme template file. To open a link in a new window or tab, use the following HTML code:

<a href="https://example.com" target="_blank">Link Text</a>

Replace ‘example.com’ with the URL of the external link and ‘Link Text’ with the desired anchor text you want to display.

Opening External Links in Navigational Menus

To open external links in your site’s navigational menu, follow these steps based on your theme:

Classic Themes

  1. Go to the WordPress admin area and navigate to Appearance » Menu.
  2. Click the ‘Screen Options’ button at the top right corner, and enable the ‘Link Target’ option under ‘Show advanced menu properties’.
  3. Add a Custom Link to your menu by entering the URL and Link Text, and then click ‘Add to Menu’.
  4. In the Menu Structure column, select ‘Open link in a new tab’ to ensure the external link opens in a new tab.
  5. Click ‘Save Menu’ to save your changes.

Block Themes

  1. Access the Full Site Editor by going to Appearance » Themes and clicking on the header area and then the navigation area.
  2. Add a new link by clicking the ‘+’ sign.
  3. In the link popup, enter the URL and toggle the ‘Open in new tab’ option to the On position.
  4. Click the ‘Submit’ icon to save your settings.
  5. Finally, click the ‘Save’ button to apply the changes.

Using a Plugin

If manually toggling the option for every external link is time-consuming or if you run a multi-author blog, you can simplify the process by using a plugin. Install and activate the ‘Open External Links in a New Window’ plugin, which will automatically open external links in new windows. Remember that disabling the plugin will deactivate this functionality.

By following these methods, you can effortlessly open external links in new windows or tabs on your WordPress site. Enhance user engagement and ensure that visitors stay on your site longer! For more WordPress tips, tricks, and hacks, browse our expert selections and subscribe to our YouTube Channel for informative video tutorials. Connect with us on Twitter and Facebook to stay updated.

Subscribe to our newsletter

Stay ahead of the game! Subscribe to our newsletter for exclusive tips and insights on Data Structures & Algorithms and interview preparation.

Leave a Reply

Related articles

10 Effective Growth Hacking Techniques to Boost Your Online Influence**

The Influence of Online Power: 10 Techniques for Boosting Growth In today's digital world, having a strong online presence...

Boost Your Productivity with Checklists: An Essential Tool for Every Blogger and Marketer

The Power of Using Checklists: Enhancing Your Efficiency as a Blogger or Marketer In the fast-paced world we live...

Convert Webpages to PDFs: A Simple Guide**

Finding an easy and reliable way to convert webpages to PDF files can be a daunting task. Many...

Mastering Freelance Success: Key Tips for Building a Thriving Career

Keys to Creating a Successful Freelance Business: Essential Strategies and Techniques Introduction: Flourishing in the Freelance Economy As the gig...