Skip to main content

Attribute Filter

Attribute Filter

One attribute people pick by reading: size, material, capacity. Global attributes only.

Place it on its own, beside the grid or in a sidebar of yours. It is one of the groups of Catalog Filters — if you use both, turn this group off there, or it shows up twice. How every filter behaves — links, folding, «show more» — is on Filters.

Its options​

The Attribute Filter properties panel

Props

PropTypeDefaultWhat it does
Headingtext—What this group is called. Leave it empty to keep the name the attribute or the taxonomy already has — which stays right when somebody renames one. Ignored when this filter draws more than one group.
Heading levelchoice: h2, h3, h4h2On its own beside the grid it is usually an h2; inside a sidebar under its own heading, an h3.
AttributetextallThe attribute name — «color», «size» — or «all» for every one the shop uses. An attribute with no terms in use never shows.
Colour attributeschoice: except, allexcept
Several chosen at oncechoice: or, andor«Any» is what most people mean when they tick two. WooCommerce's own widget defaults to «all».
Countschoice: yes, brackets, noyes
Folding → Fold the groupon / offoffTurns the title into a disclosure, so a long column reads as a list of headings. A group that is filtering something always opens, whatever the state below says.
Folding → It startschoice: open, closedopen
Show more → Choices before ittext0How many choices a group shows before the rest go behind the button. 0 shows every one. Every choice is in the page either way, so nothing is lost without JavaScript.
Show more → Its wordingtext—Empty is «Show 12 more», translated. Write your own with {count} where the figure goes.
Show more → And once opentext—Empty is «Show less», translated.
Pill size → Text sizetext0.88rem
Pill size → Paddingtext0.31rem 0.63remVertical and horizontal, as CSS writes it: «0.31rem 0.63rem».
Count text → Sizetext0.88em
Count text → Colourtextvar(--fe-woo-muted, #6b7280)
Colours → Swatch ringtextvar(--fe-woo-surface, #ffffff)The gap between a chosen swatch and its outline. Only for attributes drawn as swatches.
Colours → Chosen backgroundtextvar(--fe-woo-panel, #f6f7f9)The tint behind a value once it is picked.
Colours → Borderstextvar(--fe-woo-border, #e8ebef)
Colours → Chosentextvar(--fe-woo-accent, #111827)The outline of the value that is picked.
Colours → Text on the chosen onetextvar(--fe-woo-accent-color, #ffffff)The label of a value that is picked.

It reads the same variables as the whole column: see Catalog Filters.