跳到内容

Category Accordion for WooCommerce

v2.0.0

Themepoints · 2025年6月1日 上架

Show WooCommerce product categories and subcategories as an accessible expand/collapse accordion with a block, shortcode or widget.

正在使用
100+
评分
暂无
累计下载
2,207
最近更新
2026年11月10日
需要 WordPress 5.8+已测试到 7.1.5PHP 7.4+

贡献者

截图

The accordion in a shop sidebar: the current category is open and product counts are shown.
The accordion in a shop sidebar: the current category is open and product counts are shown.
Settings page, Content tab: sorting, product counts, hide empty and other options, with the live preview on the right.
Settings page, Content tab: sorting, product counts, hide empty and other options, with the live preview on the right.
Settings page, Style tab: colors, font size and icon style update the live preview instantly.
Settings page, Style tab: colors, font size and icon style update the live preview instantly.
Settings page, Usage tab: block, shortcode and widget instructions with the full shortcode attribute reference.
Settings page, Usage tab: block, shortcode and widget instructions with the full shortcode attribute reference.
Block editor: the Category Accordion block with its settings in the sidebar.
Block editor: the Category Accordion block with its settings in the sidebar.
Classic widget: Category Accordion Widget WooCommerce under Appearance > Widgets.
Classic widget: Category Accordion Widget WooCommerce under Appearance > Widgets.

Category Accordion for WooCommerce turns your product category tree into a clean, fast, accessible accordion for sidebars, shop pages and menus.

Live demo

Features

  • Gutenberg block, shortcode and classic widget
  • Unlimited category depth (or set a max depth)
  • Automatically opens the current category and its parents
  • Single-open or multiple-open mode, default-open options, adjustable animation speed
  • Keyboard accessible: real toggle buttons with aria-expanded and aria-controls; respects reduced-motion settings
  • Parent category links stay clickable – only the arrow toggles the section
  • Include / exclude categories, start from any parent category, hide empty, hide “Uncategorized”
  • Sort by WooCommerce custom order, name, slug, ID or product count
  • Product counts, category images and optional “View all” links
  • Arrow or plus/minus icons (no icon font required), RTL friendly
  • Modern settings page (WooCommerce > Category Accordion) with tabs, a live preview and global defaults
  • Colors and font size via CSS variables
  • Lightweight: one database query for the whole tree, cached; no jQuery; assets load only where the accordion is used
  • Works with WPML and Polylang

Shortcode

[tp_category_accordion]

Example: [tp_category_accordion parent="0" exclude="15,22" show_count="yes" orderby="name" order="ASC" multiple="no" default_open="current" icon="arrow"]

Supported attributes: parent, include, exclude, hide_empty, hide_uncategorized, show_count, show_image, show_view_all, orderby (menu_order, name, slug, id, count), order, max_depth, default_open (current, all, none), multiple, speed, icon (arrow, plus), font_size, text_color, hover_color, active_color, border_color.

Developer hooks

  • tpcafw_args – filter the sanitized settings before rendering
  • tpcafw_html – filter the final HTML

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums