Description
Category Nested Branches provides a native WP_Widget for category trees. Use it in classic widget sidebars or through the Legacy Widget block.
Configure the title, depth, content counts, descendant counts, empty-category visibility, sorting and excluded category IDs. Depth 0 shows all levels; 1 shows roots; 2 shows roots and children.
Rendering uses wp_list_categories(), canonical WordPress category links and native cat-item, current-cat, current-cat-parent and children classes. Sidebar wrappers come from the theme.
Counts follow native WordPress taxonomy rules for published content. Descendant counts include deeper levels even when those levels are hidden by the display depth. Each eligible content item is counted once per parent. Sorting by count uses direct category counts, not padded totals. Exclusions omit a category and its descendants; they do not change stored categories or relationships.
No JavaScript, theme dependency, custom SQL, telemetry, remote requests or generated content. Only normal widget settings are saved. Theme styles control the appearance.
All interface strings are translatable with the catbranchnest text domain.
Screenshots


Installation
- Upload the catbranchnest folder to wp-content/plugins, or upload its ZIP through Plugins > Add New.
- Activate CatBranchNest.
- Add Category Nested Branches to a sidebar through Appearance > Widgets (Legacy Widget in the block editor).
- Configure and save the widget.
FAQ
-
Does this modify categories or posts?
-
No. It reads the category hierarchy and stores only widget options.
-
What does include subcategory content mean?
-
Parent counters include published content assigned to descendant categories, using native WordPress padding. Hidden display levels still contribute.
-
Why is a parent with a direct count of zero visible?
-
Native hierarchical hide_empty keeps a parent when it has a non-empty descendant.
-
Does sorting by count sort by the padded displayed total?
-
No. Native category queries sort by the direct stored taxonomy count before padding.
-
What happens when I exclude a parent?
-
WordPress omits its entire branch. Exclusion is only a display setting.
-
Does it work with any theme?
-
It uses standard widget wrappers and category markup. The theme must provide a widget sidebar or Legacy Widget support. It supplies no frontend stylesheet.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“CatBranchNest” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “CatBranchNest” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
0.1.0
- Initial version: native hierarchical category widget with configurable depth, counters, descendant counts, empty-category visibility, sorting and exclusions.