Skip to content
IvaSure add-ons and services for SureCart storesJoin the POD waitlist

Taxonomy facets and hierarchy

4 min read
Published
Category
Facets

A taxonomy facet is a filter section built from one of your product taxonomies - Rooms, Product Types, Materials. Each term becomes an option, and IvaSure keeps the option list and the product grid in step as shoppers choose.

This article assumes you already have a filter on a page. If you do not, start with Add your first filter.

What a section looks like

Here is a Product Types section on a storefront. Two things carry most of the meaning: the disclosure triangle and the number.

A filter section headed Product Types. Under a search box, six options are listed: Beds, Decor, Lighting, Seating, Storage and Tables. Four of them have a small triangle to their left. Every option has a checkbox and a number on the right.
A taxonomy section with nested options.
  1. The disclosure triangle. It appears only on options that have children, so a shopper can tell at a glance which options open and which are final.
  2. The count: how many products that option would return right now. It responds to the choices already made, so it falls as a shopper narrows down.

Nesting: how a long list becomes a short one

A flat list of seventeen product types is a wall rather than a tool. Nesting the same seventeen terms under six parents gives shoppers six things to read, and the detail is one click away when they want it.

Nesting is a property of your taxonomy, not of IvaSure. If a term has a parent in WordPress, IvaSure renders it as a child; if it does not, it sits at the top level. You do not configure the tree twice.

The same Product Types section with the Tables option opened. Its triangle now points down, and four indented options appear beneath it: Coffee Tables, Desks, Dining Tables and Side Tables, each with its own count of 1, 1, 1 and 2.
Tables opened, showing its four children indented beneath it.
  1. The children, indented under their parent. Each is an option in its own right.
The parent is selectable too
Choosing Tables returns everything filed under it, including products that are only on its children. A shopper who does not care which kind of table can stop at the parent.

Reading the counts

In the screenshot above, Tables shows 5 while its four children show 1, 1, 1 and 2. That is not a coincidence and it is not a sum: a parent counts every distinct product beneath it.

The distinction matters when a product is filed under two children. It is counted once by the parent, not twice. So a parent count is always “how many products you get if you choose this”, which is the only meaning that stays true when a shopper clicks it.

A count of 0 on a parent means something is wrong
If a parent shows 0 while its children hold products, the count and the result disagree - selecting it would return products the number said were not there. Refresh your term counts, and if it persists, report it: a count that contradicts its own result is a bug, not a setting.

The search box inside a section

Long sections get their own search box. Short ones do not, which is deliberate - a search box above six options is furniture, not help.

The top of the Product Types section, showing a search input with placeholder text reading Search, above the option list.
A section search box, shown only on sections long enough to need one.

The threshold counts every option in the section, children included. So a section can cross it after you nest terms even though the number of top-level options went down.

Building and nesting sections

Sections are built on the Taxonomies tab of IvaSure → Filters. This is where you create a taxonomy, add its terms, and give those terms colours or images.

The IvaSure Filters admin screen on the Taxonomies tab, showing the four-tab rail and the section builder beneath it.
IvaSure → Filters → Taxonomies.
  1. The tab rail. Sections are built here; which of them shoppers see is decided on the Filters tab.

To nest a term, set its parent the way you would for any WordPress taxonomy - in the term editor, or in bulk with WP-CLI. IvaSure reads the tree you already have.

Nest one term under another
wp term update ks_product_type coffee-tables --parent=$(wp term get ks_product_type tables --field=term_id)
After changing terms, refresh the counts
Term counts are cached. If a number looks stale after you move terms around, clear the filter cache from the Cache and URLs tab.

Choosing which sections shoppers see

Building a section does not publish it. The section list in step 1 of the Launch checklist, on the Filters tab, decides which of your available sections appear on the storefront - see Add your first filter, step 3.

Three or four sections is a good starting point. You can always add more once you can see the filter working.

Save to list