Title: [Plugin: WP-dTree] Open node in new window
Last modified: August 20, 2016

---

# [Plugin: WP-dTree] Open node in new window

 *  Resolved [Kah-Y](https://wordpress.org/support/users/kah-y/)
 * (@kah-y)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-open-node-in-new-window/)
 * Hi,
 * I would like to know how to open each node in new window. I noticed that “Added:
   link target attributes in link tree”, but I don’t know where to make each node
   open in new window instead of open in same window =(
 * Many thanks =)
 * [http://wordpress.org/extend/plugins/wp-dtree-30/](http://wordpress.org/extend/plugins/wp-dtree-30/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [ulfben](https://wordpress.org/support/users/ulfben/)
 * (@ulfben)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-open-node-in-new-window/#post-3087026)
 * You use the middle click / long click. Every time you force a link to open in
   a new window, [a kitten dies](http://stackoverflow.com/a/3970767).
 *  Thread Starter [Kah-Y](https://wordpress.org/support/users/kah-y/)
 * (@kah-y)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-open-node-in-new-window/#post-3087063)
 * Hi ulfben,
 * Indeed, the method can work. But I need it work with single normal click instead
   of middle click / long click, which not really practical to normal user.
 * What I need exactly is, to which template file of wp-dtree-30 I should add target
   =”_new” or target=”_blank” for each node link. It doesn’t matter whether if the
   node link open in new tab nor new window, as long as it doesn’t open in same 
   window. =)
 * Thanks.
 *  Plugin Author [ulfben](https://wordpress.org/support/users/ulfben/)
 * (@ulfben)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-open-node-in-new-window/#post-3087070)
 * How and where a link opens is up to the user and her browser settings. It’s not
   something you can or should controll.
 * As for what files you need to edit, I’d assume you need to look into the wp-dtree
   javascript or the wp-dtree-lnk for that.
 *  Thread Starter [Kah-Y](https://wordpress.org/support/users/kah-y/)
 * (@kah-y)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-open-node-in-new-window/#post-3087071)
 * Hi ulfben,
 * I’m glad to have your prompt reply. Yup, I agree with your point. Anyhow, I have
   to try to make those node link open out of current window =X
 * I found if(node.target) str += ‘ target=”‘ + node.target + ‘”‘; in wp-dtree.js,
   please guide me on how to change it to be target=”_blank”.
 * Thanks =)
 *  Plugin Author [ulfben](https://wordpress.org/support/users/ulfben/)
 * (@ulfben)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-open-node-in-new-window/#post-3087073)
 * `str += ' target="_blank"';`
 * Make sure you look through the entire source though – there may be several places
   for constructing the anchors. You want to catch them all.
 *  Thread Starter [Kah-Y](https://wordpress.org/support/users/kah-y/)
 * (@kah-y)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-open-node-in-new-window/#post-3087082)
 * Hi ulfben,
 * I tried with replace that line, unfortunately, I failed to get the effect. Perhaps
   I might be failed to catch them all haha. I really appreciate your help on this
   =)
 * I think I will stop this here, and leave it intact. Thanks you =)
 *  Plugin Author [ulfben](https://wordpress.org/support/users/ulfben/)
 * (@ulfben)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-open-node-in-new-window/#post-3087088)
 * Hm. Make sure you clear the cache to. You can do that by simply adjusting the
   widget settings (switch anything on and off again). Every time the settings change,
   the cache is cleared. (its also cleared whenever you publish something)
 * Also make sure you clear any wordpress caching plugin etc.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘[Plugin: WP-dTree] Open node in new window’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-dtree-30_fcfcf8.svg)
 * [WP-dTree](https://wordpress.org/plugins/wp-dtree-30/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-dtree-30/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-dtree-30/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-dtree-30/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-dtree-30/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-dtree-30/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [ulfben](https://wordpress.org/support/users/ulfben/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-open-node-in-new-window/#post-3087088)
 * Status: resolved