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 1–12 of 38 results
-
Select options This product has multiple variants. The options may be chosen on the product page
Alder All-Weather Jacket
Price range: $149.00 through $164.00 -
Read more
Arc'teryx Beta LT Jacket
$450.00 -
Add to cart
Carhartt WIP Detroit Jacket
$268.00 -
Read more
Carhartt WIP Double Knee Pant
$148.00 -
Read more
Carhartt WIP Essentials Bag
$59.00 -
Read more
Carhartt WIP Madison Cord Shirt
$118.00 -
Read more
COS A-Line Midi Dress
$135.00 -
Sale
Read more
COS Cashmere Sweater
Original price was: $225.00.$180.00Current price is: $180.00. -
Add to cart
COS Knitted Midi Dress
$175.00 -
Add to cart
COS Oversized Poplin Shirt
$89.00 -
Add to cart
COS Quilted Crossbody Bag
$99.00 -
Add to cart
COS Wide-Leg Trousers
$135.00
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.