How to Open External Links in a New Window or Tab with WordPress


How to Open External Links in a New Window or Tab with WordPress
Deena Tibbs

@demeyere Again, the plugin above is not using target _blank to make sure that the site validates with XHTML strict. But yes, your code will do the job as well.FYI for others reading: Now anyone can simply make a plugin and call this snippet in the header. It wouldn’t make any difference in the load time between you manually putting in your header or calling it via a plugin into wp_head() hook.

WordPress.org
Carolyn Joseph

Most other plugins perform a hack by altering the target parameter (i.e. <a href=”http://somewhere.example” target=”_blank”>). That method is not XHTML Strict compliant.
This plugin handles the links client-side, which lets search engines follow the links properly. Also, if a browser does not support JavaScript, the plugin is simply inactive, and does not result in any errors.

How to automatically open external links in a new tab with WordPress
Nikia Hughey

We use (and love) WordPress here at BestTechie, it has been our content management system of choice since 2006. That’s a long time. I’ve been using WordPress’ new Gutenberg editor to create content and there’s one thing I found to be a bit finicky in the new editor: setting external links to open in a tab. After becoming frustrated enough with it I decided to figure out a way to have WordPress automatically open all external links in a new tab.

How to set links to open in a new window/tab in wordpress
Angelina Stokes

An avid blogger with a passion for WordPress, blogging, SEO and social media. My goal is to supply you with the right information to help you succeed with your wordpress blog. Circle him on Google+

Be the first to comment

Leave a Reply

Your email address will not be published.


*