Filter Product by Attribute in WooCommerce

Filters By
Updated Nov 7, 20264 min read

Attributes describe a product, such as its size, colour or material. This filter lets shoppers choose “Size: M” or “Colour: Blue” and see only the products that match. Each attribute becomes its own filter box, and you can style each one differently.

You can try attribute filters on the live demo.

WooCommerce attribute filter for Size on a shop page

Step 1: Create an attribute and its values

  1. Go to Products > Attributes.
  2. Type a Name, such as “Size”, and click Add attribute.
  3. In the list on the right, click Configure terms beside it.
  4. Add each value, such as S, M and L. WooCommerce calls these terms.

Step 2: Add the attribute to your products

  1. Open a product and go to the Attributes tab in the Product data box.
  2. Add your attribute, choose the values this product has, and save the attributes.
  3. Click Update.

The filter works only with attributes made in Step 1. Attributes typed only inside one product are not part of this list.

Step 3: Turn on the filter and choose attributes

Under Product Filters > Form Manage, set Show Attributes to On. The gear button beside it opens Exclude Attributes, where you can leave out any attribute shoppers should not see.

Show Attributes switch and its gear button on the Form Manage tab

Step 4: Style one attribute at a time

On the Form Style tab, pick Attributes in Configure Style for. A second list appears beside it, so choose the attribute you want to change.

Attributes selected with a second list for choosing one attribute

Match the style to the attribute:

AttributeA good style
ColourColor, then pick a colour for each value. Color Circle, Color With Value and Color Swatch Label are PRO.
Pattern or materialImage, so shoppers see a small picture of each value.
SizeChips PRO or Stepper PRO; on the free plugin, Checkbox or Select.
A long list, such as countrySelect 2, which saves space.

Step 5: Settings that matter for attributes

  • Single Selection: turn this on when a shopper would only ever want one value, such as one fit.
  • Operator: OR shows products with Blue or Red. AND needs both on one product, which rarely suits a colour filter.
  • Order Values/Terms By: Numeric keeps 36, 38 and 40 in order, and Menu Order follows the order you set in WooCommerce, which keeps S, M, L correct.

Other settings, such as the heading and tooltip, are explained in the category filter settings table. Click Save Changes, then repeat Step 4 for your next attribute.

Step 6: Show it on your store

Use the filters on your shop page, or paste the shortcode below into any page. To show one attribute alone, use a single filter; our guide to adding filters to your store explains both.

[plugincy_filters]

An example: a clothing shop

A clothing shop might set up its filters like this:

  • Size as Chips or Checkbox, because shoppers want to see every size at a glance.
  • Colour as Color, so they click the colour itself instead of reading its name.
  • Material as Checkbox, with AND or OR depending on your range.

A T-shirt sold in three sizes should have all three values on its product page, so it appears when a shopper picks any of them.

Attribute, category or tag?

Use an attribute for a fact that can be measured or compared, such as size or colour. Use a category for the kind of product, and a tag for a loose label such as “Gift Idea”.

If something looks wrong

  • An attribute is not listed: create it under Products > Attributes, add it to a product, and check Exclude Attributes.
  • A value is missing: make sure a product has that value, then click Clear Cache under Advance Settings.
  • Colours appear as plain words: choose the Color style for that attribute and set a colour for each value.