WP-dTree
Legacy collapsible navigation trees for WordPress.
Install in
Looking for a modern alternative?
WP-dTree has a modern successor: Content Trees.
Content Trees offers native WordPress blocks with live previews, keyboard and screen-reader support, and on-demand post loading. It can run alongside WP-dTree, allowing you to replace your navigation trees gradually.
Existing widgets and settings are not migrated automatically, and some legacy features are not yet supported. Content Trees requires WordPress 6.3 or later; see its listing for current features and requirements.
WP-dTree remains supported for security and compatibility fixes. New feature development is focused on Content Trees.
WP-dTree features
This plugin provides collapsible navigation trees for archives, categories, pages, links, custom taxonomies and menus. Use the widgets in a widget area or the template functions documented below. Archive trees can group posts by year and month.
Requires WordPress 6.0.1 or later and PHP 7.4 or later.
Additional Info
The original ‘WP-dTree’ was created by Christopher Hwang in ~2005. By 2007 Mr. Hwang seemed to have dropped of the internet for good so Ulf Benjaminsson forked the plugin in and named it ‘WP-dTree 3.0’ (note to self: having a release number in the title was stupid).
The fork was focused on performance improvements – mainly caching – but soon expanded to add a lot of new features and modernizations; compatibility with WP 2.7 through WP 3.3, widgets, out-of-the-box Scriptaculous support, link trees, feed icons and more.
For version 4.0 the entire plugin has been rewritten from scratch by Ulf, bringing it in line with the much matured WP 3.x API.
*WP-dTree (3.0 and up) is Copyright (C) 2007-2021 Ulf Benjaminsson (email: hello at my full name dot com)
*WP-dTree (3.x and lower) Copyright (C) 2006 Christopher Hwang (email: chris at silpstream dot com).
*dTree-JavaScript is Copyright (c) 2002-2003 Geir Landrö
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Written by Joobi from the project's own listing. See the source page
4.5.5
- Introduce Content Trees, the modern successor to WP-dTree, with migration guidance and a permanently dismissible administrator notice.
- Clarify that WP-dTree continues to receive security and compatibility fixes.
4.5.4
- Reduce server work when building large menu trees.
- Require WordPress 6.0.1 or later to avoid the term-cache bug in WordPress 6.0.
- Avoid opening or highlighting an unrelated item when the requested item is absent from the tree.
- Prevent similarly named cookies from affecting remembered tree state.
- Fix newly added menu items sometimes missing from cached trees.
- Prevent tree controls from overwriting variables used by other scripts on the page.
4.5.3
- Fix PHP warnings and missing trees when widget settings are empty or incomplete.
- Respect disabled duplicate entries in category and custom taxonomy trees, including when limiting posts per branch.
- Keep posts under their first matching visible term and avoid missing or hidden-parent entries.
- Fix post listing on databases enforcing strict grouping rules.
- Fix custom taxonomy Show more titles and an error when using Show more with Advanced Post Types Order.
4.5.2
- Fix duplicate archive entries and inflated counts when filtering by several categories.
- Excluding an archive category now also hides posts that belong to other categories.
- Keep cached trees up to date when categories or custom taxonomy terms are edited, assigned or removed.
4.5.1
- Archive posts are now sorted before the monthly limit is applied.
- Keep posts with matching dates or other sort values in a consistent order.
- Reduce server work when building page, category and custom taxonomy trees.
4.5.0
- Fix stored and reflected cross-site scripting and protect settings changes against CSRF (CVE-2022-47423, CVE-2023-41662 and CVE-2023-41667).
- Harden tree output, query parameters and caching; rebuild old tree caches after upgrading.
- Update PHP and WordPress compatibility and preserve returned output from the archive template function.
- Respect unchecked widget options, including icons and lines, when settings contain explicit false values.
- Correct the selected-link underline CSS.
- Include posts published exactly at the start of a month in archive trees.
4.4.5
- Fix a translation regression.
Changes in v4.4.4 (2019-03-24)
- Updated for PHP 7
- Fixed https support for links in the Links-widget
- Added support to always include parent page in hierarchy when selecting child ID’s.
Changes in v4.4.3.1 (2015-03-20)
- Added support for category-specific archives
- Added support to use description instead of name for taxonomy trees.
- Fixed the sort ordering of archives
- Fixed potential “duplicate entry”-mysql error
- Removed forgotten debug-call.
Changes in v4.4.2 (2015-01-03)
- Better sorting options for posts
- Archives now support Custom Post Types
- Support for Post Types Order (thank you, sydcode)
- Minor bug fixes
Changes in v4.4 (2014-12-22)
- Added support for WordPress’ Menus.
- Added multisite support. (thanks, John Pariseau)
- Added option to set navigation root to the current page or category.
- Fixed broken l10n.
- Fixed a XSS vulnerability. (thanks, Patrick Riggs)
- Replaced all deprecated functions.
- Fixed tons of PHP warnings and notices.
Changes in v4.3.1 (2012-01-11)
- Fixed fallbacks for uninitialized settings: never print wierd output.
Changes in v4.3 (2012-01-01)
- Added: support and widget for custom taxonomies. (needs testing, for sure…)
- Added: configurable open/close links for each tree
- Added: configurable open/close separator for each tree
- Fixed: various PHP errors and warnings.
- Fixed: feed links being wrong
- Fixed: initialization routines
- Fixed: excluding categories from the archive tree
- Fixed: excluding posts from category tree
- Fixed: open/close link separator behavior (only show when both open/close is shown)
- Fixed: link children are sorted correctly
- Fixed: Open to selection supports pagination
- Fixed: Open to selection supports categories again
Changes in v4.2 (2010-10-29)
- Fixed the uninstallation procedure.
Changes in v4.1 (2010-10-23)
- Improved installation to fix database error for some users
- Added: “limit posts” for categories and archives
- Added: error catching – dtree can’t blow up you other scripts
- Building archives is MUCH faster (2 queries total, from 1 per month)
Changes in v4.0 (2010-10-17)
- Completely recoded from the ground up for a much needed code overhaul.
- All previous settings will be lost! Write them down before upgrading.
- Added: support for multiple tree instances
- Added: support for per-tree configurations
- Added: template tags for theme developers
- Added: (optional) noscript for JS-disabled visitors
- Added: uses category descriptions for link titles
- Added: translation support
- Added: optional JS-escape (XHTML, HTML or none) to ease validation
- Added: caching is optional (per instance, to boot)
- Fixed: should properly encode quotes and HTML-entities
- Replaced Scriptacolous with jQuery
- Made truncation optional
- Removed support for WP <2.3
- Removed all CSS-options from admin area
- Removed all non-essential CSS-rules
- Only load jQuery if animation is on
- Minified JS and CSS (9KB vs. 16KB!)
- Cache is created on site visit (faster admin, less server load)
Known issues in 4.0:
- This is a true .0 release – please explore and play with all the settings. Let me know when something breaks (provide links!).
- Only tested in Chrome
opentoselectiondoesn’t handle paging
Changes in v3.5 (2008-11-26)
- New option: “shut down unused trees” (performance!)
- New option: “force open to”
- New option: per-tree truncation setting
- New option: custom sort order for archives
- New option: custom sort order for posts in categories
- New option: exclude posts from category tree
- New option: more CSS options avaliable from the admin
- Added: widget preview in the admin area
- Added: link target attributes in link tree
- Added: path defines to support non-standard WP-installations
- Added: uninstall.php for nice WP 2.7 plugin cleanup.
- Fixed: include sub-categories when counting posts
- Fixed: “close same level”
- Fixed: Quotes “” in titles breaks alt-texts
- Fixed: Nestled cats get excluded if parent is empty
- Fixed: RSS-icons don’t show in IE
- Fixed: Unwanted spacing in IE
- Misc: improved admin screen feng-shui.
- Misc: Moved config screen to “settings”-section of admin
- Misc: CSS should be a bit more robust now
Changes in v3.4.2 (2008-10-19)
- Bug: incorrect WP version detection. (thanks: StMD)
Changes in v3.4.1 (2008-07-20)
- Validates: both CSS and XHTML 1.0 Transitional (thanks: ar-jar)
Changes in v3.4 (2008-07-12)
- Added support for link trees. (needs testing!)
- Fixed breakage in WP 2.5, 2.6
- Fixed invalid XHTML output. (props: jberghem)
- Fixed a CSS-issue. (props: wenzlerm)
- Renamed the dTree script to avoid collisions with plugins using an unmodified version.
Changes in v3.3.2 (2007-11-26)
- Fixed bug with excluding multiple categories.
Changes in v3.3.1 (2007-11-02)
- Removed redundant
li-tags from widgets. (props: Alexey Zamulla) - Support for non-ascii characters. (props: michuw)
- Properly encoded ampersands (&) in javascript URLs.
Changes in v3.3 (2007-10-26)
- Optimized the dtree script, up to 40% less data required to feed the script. Using dTree now generates less markup than normal HTML.
- New option: Show RSS icon for archives
- New option: Show post count for archives
- Fix: Open to requested node
- Fix: images URL not working on some servers (props: Zarquod)
- Fix: somewhat more IE compatible…
Known issues: RSS icons wont show in IE if post count is on.
Changes in v3.2 (2007-10-15)
- Support for WP’s bundled scriptacolous library! (turn effects on in the WP-dTree options page)
- New cache structure reduces cache size with ~33% compared to previous implementations.
- New option: Show RSS icon for categories
- New option: Show post count for categories
- New option: Effect duration
Regressions: open to selection is broken again. It’ll be back in the next version, but if it’s vital for you, stay with 3.1
Changes in v3.1: (2007-10-06)
- Updated to comply with WordPress 2.3’s new taxonomy tables for categories.
- Widgetized! You no longer need to edit your sidebar manually.
- Fixed “Open To Selection”-option.
Changes in v3.0: (2007-08-17)
- Forked from the dead WP-dTree 2.0
- Added caching. The plugin creates the trees (only) when blog content changes, instead of creating them on every visit. Displaying the front page on the dev site went from 411 queries to 18. 🙂
Follow this listing's changes (Atom feed)