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 13–24 of 38 results
-
Select options This product has multiple variants. The options may be chosen on the product page
Cove Merino Crew
Price range: $109.00 through $119.00 -
Add to cart
Everlane Cashmere Crew
$168.00 -
Add to cart
Everlane Linen Camp Shirt
$88.00 -
Sale
Add to cart
Everlane Silk Slip Dress
Original price was: $198.00.$148.00Current price is: $148.00. -
Add to cart
Everlane The Day Market Tote
$165.00 -
Select options This product has multiple variants. The options may be chosen on the product page
Field Twill Shirt
Price range: $89.00 through $104.00 -
Select options This product has multiple variants. The options may be chosen on the product page
Harbor Oxford Shirt
Price range: $79.00 through $94.00 - Add to cart
-
Select options This product has multiple variants. The options may be chosen on the product page
Linen Column Dress
Price range: $139.00 through $149.00 -
Select options This product has multiple variants. The options may be chosen on the product page
Meadow Wrap Dress
Price range: $129.00 through $139.00 -
Add to cart
Muji Linen Blend Dress
$69.00 -
Add to cart
Muji Yak Wool Cardigan
$89.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.