Adding Global Product Attributes in WooCommerce

In this lesson we’ll be adding Global Attributes to WooCommerce. These attributes, once defined, will be available to assign to all our products. It’s also possible to add Attributes when creating individual products – but these will only apply to that particular product.

In the left hand admin menu click on Products then Attributes. Alternatively hover over Products and click Attributes on the flyout menu that appears.

One the left of the screen is the form for adding a new attribute, on the right is a list of previously added attributes.

Attributes are things like size, colour etc. Consider your product range and all the ways you’d like customers to be able to choose from them. For example if you are selling t-shirts then size and colour attributes might be needed.

Adding a new Attribute

On the left of the screen you have some options to Add a new attribute.

Name

Type the name of your attribute, e.g. Colour.

Slug

WordPress will automatically fill this in for you based on the name of your attribute. You can manually set a ‘Slug’ if you need to. This is actually how your attributes’ name is used in your url’s.

Enable Archives?

If you check this box your users will be able to visit archive pages of your Attribute, e.g. If Colour is an attribute, with red and yellow as Terms then users would be able to visit Red and Yellow pages to view products. This option relies on your current theme – so may need additional work.

Type

Use the dropdown, Type Select to choose how users will use your attribute. Select (the default setting) will display a dropdown box of your attribute’s terms whilst Text will allow users to enter some wording – an example would be to enter some wording for engraving.

Default sort order

The dropdown Custom ordering allows you to choose how the individual terms assigned to your attribute are ordered on the front of your website.

TIP

To begin with leave the Type and Default sort order to their standard settings – these can always be changed later.
  • Custom ordering (the default setting) allows you order the terms any way you choose
  • Name will sort the terms A-Z
  • Name (numeric) will sort the numerical terms lowest to highest
  • Term ID will sort the terms on the order you add them.

Next click on the Add attribute button. You’ll now see your new attribute appear in the right hand column of the screen.

Repeat this for your other attributes.

Adding Terms to Attributes

Now you have some attributes it’s time to start adding in some terms for each of these. Hover over one of your newly created attributes in the list on the right, and far right under Terms click the link Configure terms. Older versions of WooCommerce show a small button with a ‘cog’ on it, click this.

Now type the Name of the new term, for e.g. if you called your first attribute Colour, then begin adding in your colours, so type Red in the Name, you can leave the Slug and Description fields, and then click Add New X (X will be the name of your attribute – Colour in the example). Repeat this adding all your terms (each colour in this example).

HINT

If you’re using the Custom ordering setting for your Attribute remember you can drag and drop the individual terms into your preferred display order, hover over a term in the right hand list until the ‘cross’ cursor appears – repeat for the other attributes.

To add terms to a different attribute click on Attributes again on the left hand menu, and hover over the next attribute in the list (on the right) and clicking the Configure terms or ‘cog’ button to start adding terms to your next attribute.

NOTE

When adding your attributes and terms for each try to think about your entire product range, e.g. an attribute called ‘Size’ could be used on very different products, so terms might include; small, medium, large, 10cm, 20cm, 30cm. You’ll choose from this list when adding your individual variable products.
Published on in Tutorials.