Product categories
Product categories are the main way to group products with similar features. You can also add subcategories if wanted.
For example, if you sell clothing, you might have “t-shirts”, “hoodies”, and “pants” as categories.
How to add/edit product categories
Categories are managed from the Products > Categories screen.
Similar to categories on your posts in WordPress, you can add, delete, and edit your product categories here.
- Add a Name.
- Optionally, add a Slug; this is the URL-friendly version of the name.
- Choose a Parent if this is a subcategory.
- Optionally, give a Description; some themes display this.
- Choose the Display type. Here, you decide what is shown on the category’s landing page. “Standard” will take your theme’s default. “Subcategories” will display only the subcategories. “Products” will only display products. “Both” will display subcategories and products below that.
- Optionally, Upload/Add Image. Some theme will have pages where product category images are displayed, so this is a good idea.
Storefront by default displays product category images on the homepage template.
Categories can also be reordered by dragging and dropping – this order will be used by default on the front end whenever the categories are listed. This includes both widgets and the subcategory view on product pages.
When you add a new product through Products > Add Product, you’ll be able to select this new product category from the list.
Alternatively, you can go to Products > Add Product directly, and select Add New Product Category there.
The taxonomy is product_cat
.
Product tags
What are product tags?
Product tags are another way to relate products to each other, next to product categories. Contrary to categories, there is no hierarchy in tags; so there are no “subtags”.
For example, if you sell clothing, and you have a lot of cat prints, you could make a tag for “cat”. Then, you could add that tag to your menu or sidebar so all those cat lovers can easily find all t-shirts, hoodies, and pants with cat prints.
How to add/edit product tags
Tags can be added similarly to adding product categories and work in exactly the same way as post tags. See the WordPress.org Codex for more information.
The taxonomy is product_tag
.
Product attributes
What are product attributes?
A third, and very important way, to group products are attributes. There are two uses of this data type that are very relevant for WooCommerce:
- One of the WooCommerce widgets, “WooCommerce Layered Nav”, works based attributes. If you add this widget to your sidebar, customers will be able to filter the products in your store based on the attribute.
- The second important use is variable products. In order to make a variable product, first an attribute must be defined for the product. Those attributes can then be used to make a distinction between the different variations. More info about variable products can be found here.
For example, if you’re selling clothing, two logical attributes will be “color” and “size”, so people can search across categories for a color that fits their style and type, and for clothing that is available in their size.
How to add/edit product attributes
Set global attributes
Go to Products > Attributes in order to add, edit and remove attributes.
Here you can quickly and easily add attributes and their terms.
- Add a Name.
- Optionally, add a Slug; this is the URL-friendly version of the name.
- Enable Archives if wanted. If enabled, you will be able to view a page with all products in having this attribute. For example, if you have this enable, and “black” is one of the options under “color”, you can add
http://yourstore.com/pa_color/black/
to your menu to only display the black clothing – pa
stands for “product attribute”.
- Choose the Type. This is used in the products. If you want to have the same attribute values for your whole store, you can choose “Select”. On the individual product, you’ll be able to select the attributes. If you choose “Text”, you’ll be able to type new values to the attributes.
- Choose the Default sort order. You can choose between “Name”, “Name (Numeric)”, “Term ID” or “Custom ordering” where you decide by dragging and dropping the terms in the list when configuring the terms (see below). “Name (Numeric)” is relevant if the values are numbers. If you select “Name”, it will sort it alphabetically with 1 and 10 preceding 2. If you select “Name (Numeric)” it will sort based on numerical value.
Select Add Attribute.
The attribute will now be added in the table on the right, but without values.
Select the gear icon to add attribute values. You’ll see “Configure terms” when you hover over it.
Next, you’ll be able to Add New “Attribute name”, where “Attribute name” will automatically take the name you’ve given to the attribute in the previous step.
Add as many values as you want. If you’ve chosen “Custom ordering” for the attribute, reordering your values can be done here.
Add global attributes to product
Now, you can add the created attributes to your products.
Go to: Products > Add Product (or edit an existing one).
Then, select the Attributes tab in the Product Data. There you can choose any of the attributes that you’ve created in the dropdown menu.
Select Add.
If you’ve selected an attribute of the “Select” type, you’ll be able to add all terms you’ve added before.
If you’ve selected an attribute of Test type, you’ll be able to add terms separated with a pipe (“|”). These terms will be added to your global attributed once you’ve saved.
Add custom attributes
Alternatively, you can add an attribute you only want to use for 1 product. This would probably only be ideal if you have a product with unique variations.
Go directly to: Product > Add Product.
Select the Attributes tab.
There, choose Custom product attribute in the dropdown and follow the above steps.