WooCommerce Color Swatch Filter for Fashion Products

A WooCommerce color swatch filter presents color terms as visual choices. This fashion demo uses the pa_color attribute and manual swatch data, so shoppers can select a visible color instead of relying on text alone. Choose a swatch and check the products associated with that color term.

Try this: Pick a color swatch and watch the fashion result count change.

How this demo is configured

  • Create a filter by Colour (product attribute pa_color). Show as Checkboxes. Show terms as color swatches.
Filters
Colour
Colour

Showing 25–36 of 38 results

How color swatches use attribute terms

The demo marks Color as a color control, uses pa_color, and reads each term color from its color field. The term remains the query value.

When a shopper selects a swatch, the query uses the matching color term. The product data still needs the correct color attribute assigned to each item.

When visual color choices help

Swatches make color terms easier to compare when color is the decision. Each term needs a valid color value and a clear label.

Keep the Color attribute and term label on each product; the swatch adds a visual cue from the saved term color.

Configure a color filter

  1. In Matlock's WP Search & Filter Everything → Settings, enable Smart Color Detection (experimental) to show the color controls.
  2. Create a product Filter Set and add a taxonomy filter for the color attribute.
  3. Set Filter name (shown to shoppers) to Color, choose a unique URL keyword, and select Category/Attribute (taxonomy) under What are you filtering?.
  4. Under Display & choices, enable This filter represents colors. Set Color attribute source to Select manually, then choose the attribute under Color attribute.
  5. Check the color term data used by your store. Set How shoppers choose to the view that fits the selection behavior.

Color values must match your taxonomy

Each pa_color term stores its swatch color in the color field. For another color attribute, choose the term-color source and metadata key that hold its values.

Keep color labels visible when shoppers need the names beside swatches; the global setting can hide them.

Frequently asked questions

Do swatches replace the product color attribute?

No. The filter still queries the selected taxonomy term. The swatch is a visual representation of that term.

What data does this demo use?

It uses the pa_color taxonomy and a manual color source that reads the term color field.