Performancing Metrics

Open Links in New Window

Here’s a tutorial for making WordPress open links in a new window. It would be nice if the user could set the link attribute in the options page but until that option is available, Paladin has the hack. This tutorial does include altering core files so unless having links open in the same window keeps you up at night, you probably don’t need this.

Categories: WordPress Hacks

This post was written by . You can visit the for a short bio, more posts, and other information about the author.

Get backlinks to your Blog!

Promote Your Blog

If you are looking to promote your blog and get high quality backlinks from a PR6 2003 domain then Blogsearchengine.com is for you. For as little as $14.99 you can submit your blog and have a review written and published there with a backlink to your website or blog, we accept all niche!


Comments Closed

Comments

  1. nigel says: 4/2/2005

    Everything I’ve read on usability has slammed opening links in new windows as it effectively breaks the back button. While in some instances I agree with this theory there are times when it is useful to open things in new windows but at the end of the day if a user wants to open something in a new window they will probably pick ‘Open in new window’ or ‘Open in new tab’ from their context menus. If it could be set in WP by the user then that would be cool because they can choose what they prefer instead of having it forced upon them.

  2. John says: 4/2/2005

    From a site owners perspective it’s nice to have external links open in a new window and internal links open in the same window. But, I think you’re right that proper usability is outside links use the same window.

  3. Ajay DSouza ) says: 4/3/2005

    This is very much a website owners perspective. I prefer opening links to external pages in a new window for the simple reason it takes the user away from my site and for the more amateur readers, it becomes easier to just close another window than click the back button, especially they have several windows open in the first place.

    BTW, I have written a similar hack which requires the editting of only quicktags.js file and provides better flexibility in adding the target attribute.
    Please check it out here.

  4. the Other michael says: 4/3/2005

    From a web USER’s perspective, I HATE it when a website hijacks my browser and tells me where to open what.

    I consider the browser opening a link in a new window roughly the equivalent of a pop-up ad.

    Not quite, but d**n irritating.

    But, this is a techinical post, isn’t it. Like teaching somebody how to crack safes. As such, I heartily approve.

    But when I see a website utilising this, I’m not going back….

  5. Zama says: 4/3/2005

    I agree with Nigel and Michael — as soon as I see a site do this, I don’t come back. It’s simply rude and inconsiderate.

    And I say this from a web site operator’s perspective. None of my sites open links in new windows. Why? If my site is providing value, people will use the Back button to come back to the site. I think a lot of folks who foist new browser windows on people do so because their sites don’t offer enough value to keep people coming back of their own accord.