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.
Showing 25–36 of 38 results
-
Select options This product has multiple variants. The options may be chosen on the product page
Orchard Cable Knit
Price range: $119.00 through $129.00 -
Add to cart
Patagonia Better Sweater Fleece
$139.00 -
Add to cart
Patagonia Black Hole Duffel 40L
$159.00 -
Add to cart
Patagonia Nano Puff Jacket
$239.00 -
Add to cart
Patagonia Quandary Pants
$99.00 -
Sale
Add to cart
Polo Ralph Lauren Oxford Shirt
Original price was: $125.00.$99.00Current price is: $99.00. -
Select options This product has multiple variants. The options may be chosen on the product page
Ridge Insulated Parka
Price range: $189.00 through $204.00 -
Sale
Add to cart
The North Face 1996 Retro Nuptse Jacket
Original price was: $330.00.$279.00Current price is: $279.00. - Add to cart
-
Add to cart
Uniqlo Oxford Shirt
$29.90 -
Add to cart
Uniqlo Rayon Long Dress
$49.90 - Add to cart
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
- In Matlock's WP Search & Filter Everything → Settings, enable Smart Color Detection (experimental) to show the color controls.
- Create a product Filter Set and add a taxonomy filter for the color attribute.
- Set Filter name (shown to shoppers) to Color, choose a unique URL keyword, and select Category/Attribute (taxonomy) under What are you filtering?.
- Under Display & choices, enable This filter represents colors. Set Color attribute source to Select manually, then choose the attribute under Color attribute.
- 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.