Available Sort Options
| orderby Value | Description |
|---|---|
name |
Alphabetical by category name. Most common choice. |
id |
Numerical order by the category’s term ID (reflects creation order). |
slug |
Alphabetical by URL slug. |
order |
Custom drag-and-drop order set in WooCommerce. |
count |
By product count, highest first (when order=desc). |
Setting Custom Order in WooCommerce
WooCommerce lets you set a drag-and-drop order for product categories. To use it:
- Go to Products → Categories.
- Click Configure order (the link appears near the category list heading).
- Drag categories into your desired sequence.
- Click Save order.
- In WCA settings (or shortcode), set
orderby="order".
Note: Custom order is stored as term_order in the wp_term_taxonomy table. If your site has many categories and drag-and-drop is slow, use the Category Order and Taxonomy Terms Order plugin for a better UI.
Excluding Categories
To exclude specific categories from the accordion, find their IDs and add them to the Exclude Categories setting (or the exclude shortcode attribute).
Finding a Category ID
- Go to Products → Categories.
- Hover over the category name — the term ID appears in the URL at the bottom of your browser:
term_id=42. - Alternatively, click the category to edit it and note the
tag_IDvalue in the address bar.
Excluding via Shortcode
[WC-Category-Accordion exclude="12,45,67"]
Excluded categories and all their children are hidden from the accordion. They are not removed from your WooCommerce shop — only from the accordion display.
Sort Direction
Use order="asc" or order="desc" to control sort direction. For alphabetical, ASC (A→Z) is most common. For count-based sorting, DESC (most products first) usually makes the most sense.