CatBranchNest
CatBranchNest
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.
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.
Screenshots
Faq
No. It reads the category hierarchy and stores only widget options.
Parent counters include published content assigned to descendant categories, using native WordPress padding. Hidden display levels still contribute.
Native hierarchical hide_empty keeps a parent when it has a non-empty descendant.
No. Native category queries sort by the direct stored taxonomy count before padding.
WordPress omits its entire branch. Exclusion is only a display setting.
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
Changelog
0.1.0
- Initial version: native hierarchical category widget with configurable depth, counters, descendant counts, empty-category visibility, sorting and exclusions.

