WooCommerce custom taxonomies: The easy way to display extra product data & filters

WooCommerce custom field plugin

WooCommerce comes with various fields for storing product data. There's the product name, long and short description, price, images, stock, weight, dimensions, etc. But what happens if you want to store and display extra product data, such as WooCommerce custom taxonomies?

In this article, I walk you through creating WooCommerce custom taxonomies for products. We'll look at the difference between WooCommerce custom fields and taxonomies. Also, we'll consider the different types of product data. You will also learn how to add custom taxonomies to store extra information about WooCommerce products.

At the end of this guide, you will have mastered how to:

And remember, you can do all this without writing a single line of code!

Ready to start displaying products with custom fields & taxonomies? But before we dive in, let's quickly examine how to create and display a WooCommerce custom product taxonomy.

What is product taxonomy?

A product taxonomy is a means of structuring products into different groups and subgroups based on their features, attributes, and characteristics. It enables customers to find the products they want without wasting time. It also helps you as a seller organise your products, which makes it easier to manage your inventory, sales and marketing effort.

The categorization can be based on size, colour, style, materials, target market, price range, or anything else.

What is a WooCommerce custom taxonomy?

In WooCommerce, a custom taxonomy organizes and classifies products to show advanced custom fields beyond the standard product categories and tags. It allows you to group products based on specific product attributes using hierarchical or non-hierarchical groupings.

To create a custom taxonomy in WooCommerce programmatically, you might have to use a new set of labels. Besides, you'll have to register the taxonomy with the WordPress core and associate the taxonomy you wish to classify.

An easier option is to create a WooCommerce taxonomy using a WordPress plugin. You can use a plugin to create custom taxonomies such as brands, sizes, seasons, materials, and other relevant product data. Keep reading to discover the best WooCommerce taxonomy plugins for creating, displaying, and filtering taxonomies.

What are the benefits of using WooCommerce custom taxonomies?

Using WooCommerce custom taxonomies provides many benefits. These include better product organization, enhanced filtering, improved navigation, flexibility, and higher visibility. Integrating relevant keywords in your custom taxonomy terms enables more laser-focused product pages for better SEO.

What's the difference between WooCommerce custom fields and taxonomies?

We usually use the phrases 'custom fields' and 'custom taxonomies' in relation to WooCommerce product data. However, many people don't know exactly what they are and their differences. WooCommerce custom fields are used to store arbitrary, one-off information about a product. On the other hand, custom taxonomy is used for grouping things together. This reflects in the way you add custom fields and custom taxonomies for products in the WordPress admin:

Custom fields appear in the main column of the Add/Edit Product screen. This is where you add other unique product data such as title, description, price, etc.

In contrast, custom taxonomies appear in the right-hand column under the product categories and tags. Each WooCommerce taxonomy term should be selected for multiple products like categories and tags.

Difference between WooCommerce custom fields and taxonomies

When should I use custom fields & when should I use a WooCommerce taxonomy?

Once you understand the difference between a WooCommerce custom field and taxonomy, it becomes more obvious when to use each one.

As a rule of thumb, you can decide between custom fields and taxonomies by asking: "Is the data I am adding unique to each product, or does it apply to multiple products?" If the data is unique for each WooCommerce product, you need a custom field. However, if you want to select the same value for several products and use it to group them together (e.g., via a product filter), then you need a WooCommerce taxonomy.

Here are some examples to help you choose:

  • WooCommerce clothes store displaying the color of each product. If you're selling clothes in WooCommerce, you'll probably want customers to be able to find products by color. You'll have multiple products of each color. By creating a WooCommerce custom taxonomy called 'Colour', customers can filter the list of products to find the color they like. This wouldn't be possible with a custom field.
  • WooCommerce second-hand site storing 'condition' information about their used products. If you're selling used goods like eBay, you'll need a field to store details of any damage, etc. The description of each item's condition will be unique to that product, so you should create a WooCommerce custom field.
  • WooCommerce product directory with a large product database. WooCommerce directory-style websites with large numbers of products often list extra product data within the directory listings view. For example, a book directory might include data for author, publisher, and year.

Use custom fields and taxonomies together

To use the 2nd example above, a store selling used goods might want a WooCommerce taxonomy called 'Condition' AND a custom field called 'Condition Description'. The 'Condition' taxonomy would include the terms "New," "As New," and "Used," which apply to multiple products.

You could create product filters so customers can narrow their search based on the overall condition. The 'Condition Description' custom field would provide unique information about the exact condition of the product and any damage.

Video tutorial - WooCommerce custom fields & taxonomies

In this video tutorial, you can watch me create WooCommerce taxonomies and custom fields and display them on a WordPress website. There are also full written instructions below:

How to create a WooCommerce custom taxonomy

Easy Post Types and Fields is the best plugin for creating a custom taxonomy for WooCommerce products. It's 100% free and has everything you need to add extra taxonomies to your store.

WooCommerce products are custom post types in WordPress. That's why you need a plugin which lets you add taxonomies to a WordPress post type.

Other plugins like Advanced Custom Fields (ACF) let you create custom fields but not taxonomies. Easy Post Types and Fields lets you do both.

Next, I'll show you how to create WooCommerce custom taxonomies with the free Easy Post Types plugin. After that, you'll learn how to display them on the front end, and how to let customers filter by taxonomy.

Setup instructions

Here's how to use Easy Post Types as a WooCommerce custom taxonomy plugin:

    1. Go to Plugins → Add New in the WordPress admin and search for 'Easy Post Types and Fields'.
    2. Install and activate the plugin by Barn2. Skip through the setup wizard because you don't need to create a new post type.
    3. Go to the 'Post Types' section on the left of the WordPress admin and click on the 'Existing Post Types' tab.
    4. Find the 'Products' post type and click on the Taxonomies button for it.
    5. Now set up your WooCommerce custom taxonomy:
      1. Add the Taxonomy Slug (ideally 1 word, lowercase).
      2. Add a plural and singular name (label). This will only appear in the WordPress admin.
      3. Choose whether or not you want the custom taxonomy to be hierarchical. Hierarchical taxonomies are like product categories, where you can create multi-level nested structures with parent and child categories. Non-hierarchical taxonomies are like tags, which are flat and can't be structured.
      4. Click to add the taxonomy to WooCommerce.

Now go to the Edit Product page, and you'll see the custom taxonomy on the right-hand side, under the categories and tags. Add one or more taxonomy terms for each product, just like standard product tags.

You'll also see a section for managing your new WooCommerce taxonomy under the 'Products' section of the WordPress admin. For example, if you created a taxonomy called 'Brand' then a 'Brands' link will appear there.

Displaying WooCommerce custom taxonomies on the front end

Display extra WooCommerce product data

Editing the template files for your products' taxonomy archive pages is ideally the only way to display custom taxonomies for WooCommerce products. However, this involves a bit of coding knowledge.

But the good news is that there's a handy WordPress plugin to list products in a table and extra data, such as WooCommerce custom taxonomies. It's an ideal way to display products with extra information, as everything is presented in a structured tabular format. You can add product tables to any WordPress page, your main WooCommerce shop or product category pages, or even a single product page.

The WooCommerce Product Table WordPress plugin is one of the best for displaying custom taxonomies. This is because it supports all the usual WooCommerce product data, plus custom fields and custom taxonomies. Each item of product data is listed as a separate column in the table.

Customers can search or sort the table by any product custom taxonomy term. They can also filter by taxonomy via handy dropdown lists above the table. The WordPress plugin allows you to create WooCommerce tables with only products as a specific taxonomy term.

Comparatively, this is much easier than modifying your WooCommerce template files. Moreover, you get all the other benefits from product table layouts, such as improved conversion rates.

How to create a product table with WooCommerce custom taxonomies

Setting up a WooCommerce Product Table with all the extra product data is easy.

Install WooCommerce Product Table

  1. Get WooCommerce Product Table. Download the WordPress plugin using the link on the order confirmation page and email.
  2. In the WordPress admin, go to Plugins → Add New. Upload the plugin files, and install and activate the plugin.
  3. Go to the plugin settings page: WooCommerce → Settings → Products → Product tables. Enter your license key and click Save. You can also choose some default settings which will be used for all your product tables. This saves you from creating such complex shortcodes later, as these settings will be used automatically whenever you create a product table.

Now, the product table plugin is set up. The next step is to add product tables to your website. Use one of the following methods, depending on where you want to display WooCommerce taxonomies.

How to show WooCommerce taxonomies on a standard WordPress page

Setting up a WooCommerce Product Table with all the extra product data is easy.

Install WooCommerce Product Table

  1. Get WooCommerce Product Table. Download the WordPress plugin using the link on the order confirmation page and email.
  2. In the WordPress admin, go to Plugins → Add New. Upload the plugin files, and install and activate the plugin.
  3. Go to the plugin settings page: WooCommerce → Settings → Products → Product tables. Enter your license key and click Save. You can also choose some default settings which will be used for all your product tables. This saves you from creating such complex shortcodes later. Also, you can use the settings automatically whenever you create a product table.

Now, the product table plugin is set up. The next step is to add product tables to your website. Use one of the following methods, depending on where you want to display WooCommerce taxonomies.

Use a shortcode to list products with their custom taxonomies:

WooCommerce Product Table comes with a shortcode which you can use to list products anywhere on your site, complete with custom taxonomy columns. For example, this shortcode will create a table containing columns for the product name, a custom field called 'Condition', a custom taxonomy called 'Color', the price, and add to cart buttons:

[product_table columns="name,cf:condition,tax:color,price,buy"]
How to dislay WooCommerce custom fields and taxonomies

Display custom taxonomies on the WooCommerce shop page or product category archive

Most people use the shortcode method to add WooCommerce Product Table to normal WordPress pages.

Alternatively, you can add product tables with custom taxonomies directly to the main WooCommerce shop page or category pages. To do this, you just need to do two things:

  1. Tick the relevant options on the plugin settings page or in the setup wizard. This will automatically replace the standard layout on your shop pages with the product table layout.
  2. Include custom taxonomy columns when you choose which columns to include in the table. To do this, list the columns that you want to include. Add tax: before the slug of each taxonomy. For example, you might add this into the columns option: image,name,tax:year,tax:publisher,buy

How to show WooCommerce custom taxonomies on the single product page

You can also use the shortcode method described above to show custom taxonomies on the single product page. However, you need to do it a bit differently because this time, we only want to show one product in each table. Here's how to do it:

  1. WooCommerce custom fields taxonomies single product page
    Install WooCommerce Product Table.
  2. Go to edit the product where you want to display custom fields and taxonomies.
  3. Add a product table shortcode to the Short Description field.

You can use this shortcode as a starting point.

[product_table columns="cf:size,tax:fabric,stock" page_length="false" search_box="false" reset_button="false" totals="false" include="19" links="none"]

This lists the data for the current product. There are columns for a custom field called 'size', a custom taxonomy called 'fabric', and a stock column. I have hidden elements such as the search box and product name, which aren't needed on the single product page.

Replace the sections of the shortcode in red as follows:

  • cf:size - Replace 'size' with the name of the custom field you want to display in the table. Remove this part of the shortcode if you don't want to display any custom fields. (More information here.)
  • tax:fabric - Replace 'fabric' with the name of the custom taxonomy you want to display on the product detail page. If you want to display multiple custom taxonomies, that's fine too - just add each one separated by a comma. (More information here.)
  • include="19" - Replace the number 19 with the product ID you want to show the data for. You can find this by going to the 'Edit Product' screen in WooCommerce. Look at the URL at the top of your browser window. For example, my example product has the URL /wp-admin/post.php?post=19&action=edit. This tells me that the ID is 19. Do the same and find the ID for your product.
  • You can also make any other changes to the product table, for example, by adding or removing columns. See the full list of options in the knowledge base.

Now save the product and view it. You will see a simple WooCommerce table in the short description field containing the custom taxonomy and other product data.

List WooCommerce products with a specific custom taxonomy term

By default, your WooCommerce product tables will list all the products in a table. This is perfect if you plan to have a single table listing your entire WooCommerce inventory.

However, you can also create product tables listing products from a specific category, tag, custom field, or WooCommerce custom taxonomy term.

Here's an example to get you started. To do it on your own website, you will need the custom taxonomy slug AND individual term slug. In this example, we're using a custom taxonomy with the slug 'colour' and a term with the slug 'red'. We need to include both in the product table shortcode:

[product_table columns="name,tax:color,price,buy" term="color:red]

You can list WooCommerce products with multiple custom taxonomy terms. See the documentation for full details.

Let customers filter by WooCommerce taxonomy

So far, we've talked about how to display WooCommerce custom taxonomies on your website. In addition to this, your customers can benefit from being able to filter the list of products by taxonomy. Product filter by custom taxonomy allows customers to easily find whatever product they're looking for.

There are two ways to add taxonomy filters, depending on whether or not you're already using WooCommerce Product Table to display your taxonomies.

Use WooCommerce Product Table to add taxonomy filter dropdowns

WooCommerce Product Table comes with taxonomy filters which you can display as dropdown lists above the list of products. You can add a separate filter for each custom taxonomy (plus other data such as attributes, variations, categories and tags - instructions here). Customers choose a taxonomy term from the dropdown and use it to filter the list of products.

You can create WooCommerce product filter by custom taxonomy either on the WooCommerce Product Table settings page or directly in the shortcode. For example, this shortcode will create a table with taxonomy filters for Year and Publisher:

[product_table columns="name,tax:year,price,buy" filters="tax:year,tax:publisher"]

Add advanced WooCommerce taxonomy filters with the Product Filter plugin

WooCommerce faceted search filters
A WooCommerce shop with taxonomy filters for Gender, Color, Size, and Activity

For more advanced and flexible custom taxonomy filters, you can use the WooCommerce Product Filters plugin. This comes with many taxonomy filters, including checkboxes, radio buttons, clickable images, range sliders, and much more.

The WooCommerce Product Filters plugin offers a wide range of customization options for displaying taxonomy filters. You can choose from different styles such as checkboxes, dropdowns, images, image labels, or even color swatches. This means that you can create a taxonomy filter that matches your store's design and makes it easy for customers to find the products they are looking for.

For example, if you have a clothing store and want to allow customers to filter products by color, you could use color swatches as the taxonomy filter. This way, customers can easily click on the color swatch they want and see all the products available in that color.

Alternatively, if you have a store that sells products of different sizes, you could use a dropdown menu as the taxonomy filter. This would allow customers to select their preferred size and see all the products available in that size.

Take control over your WooCommerce product taxonomies

In this article, we have covered the best plugins for adding and displaying product taxonomies in your WooCommerce store:

  • The free Easy Post Types and Fields plugin makes it easy to add custom taxonomies to your WooCommerce products.
  • WooCommerce Product Table displays taxonomies on the front end of your website. You can do this on the single product page, your main shop pages, individual product pages, and list products by taxonomy.
  • The WooCommerce Product Filters plugin adds advanced filters so that customers can find products based on their taxonomy terms.

Armed with these tools, you can add a wide range of custom data to your products and take your store to new levels of success. Mix and match the plugins to get the full benefits of WooCommerce custom taxonomies in your store. The possibilities are endless!

30 Comments

  1. I have one question. I have problems to understand why custom taxonomy is used for color and not product attribute. So if you have product with three distinct "Values" you want to group products by, like Color, Smell and Material type, what are the pros and cons of using product attributes vs custom taxonomy?

    Thank you very much,
    Viktor

Please share your thoughts...

Your email address will not be published. Required fields are marked *