Website Design, Development and Consulting
In: Daily
30 Jan 2009If you want your links in WordPress to open in a new window/tab:
Open Link in a new windowTo manually add the code to your HTML, use the target attribute with the value of _blank like this: <a href=”http://yourlink.com” target=”_blank“>Your Link</a>
Read more about the target attribute at W3Schools.com
5 Responses to How to Make Your WordPress Links Open In A New Window
Carla
April 6th, 2009 at 2:34 am
This information was just what I needed. Thank you.
How
August 11th, 2009 at 9:20 pm
how to make it default to all of your pages
Mike
April 14th, 2010 at 3:22 pm
I would like to know that too.
Its Extremely annoying to do this in every single post. It kills so much time. Any ideas?
Please someone….
Cliff
June 1st, 2010 at 9:41 am
Me too…how to make it the default selection???
Dave
June 24th, 2010 at 1:25 pm
1. Open this file:
wp-includes/js/tinymce/themes/advanced/js/link.js
2. Look for this code around line 140
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang(‘not_set’), ”);
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang(‘advanced_dlg.link_target_same’), ‘_self’);
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang(‘advanced_dlg.link_target_blank’), ‘_blank’);
3. Reorder so target_blank option is on top
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang(‘advanced_dlg.link_target_blank’), ‘_blank’);
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang(‘advanced_dlg.link_target_same’), ‘_self’);
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang(‘not_set’), ”);