CatBranchNest

描述

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.

螢幕截圖

安裝

  1. Upload the catbranchnest folder to wp-content/plugins, or upload its ZIP through Plugins > Add New.
  2. Activate CatBranchNest.
  3. Add Category Nested Branches to a sidebar through Appearance > Widgets (Legacy Widget in the block editor).
  4. Configure and save the widget.

常見問題

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.

評價

There are no reviews for this plugin.

貢獻者及開發者

“CatBranchNest” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 CatBranchNest 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄。

修改日誌

0.1.0

  • Initial version: native hierarchical category widget with configurable depth, counters, descendant counts, empty-category visibility, sorting and exclusions.