WooCommerce Custom Taxonomies: The Easy Way to Display Extra Product Data & Filters

April 7, 2020 25 comments

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?

I’m going to tell you how to create WooCommerce custom taxonomies for products. We’ll look at the difference between WooCommerce custom fields and taxonomies and which to use for different types of product data. I’ll also show you how to add custom taxonomies to store extra information about WooCommerce products.

Finally, I’ll teach you an easy way to display products with WooCommerce custom taxonomies in a searchable, sortable table. You can show the extra fields on a normal WordPress page, on your shop or product category pages, or on the single product detail page. You can even let customers filter by custom taxonomy, making it easier to find your products.

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

Display products with custom fields & taxonomies using the bestselling WooCommerce Product Table plugin.

WooCommerce Product Table
Display extra product data & filters in your store with custom taxonomies

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

The phrases ‘custom fields‘ and ‘custom taxonomies‘ are often mentioned in relation to WooCommerce product data. But lots of people don’t know exactly what they are, and what is the difference.

WooCommerce custom fields are used to store arbitrary, one-off information about a product. A custom taxonomy is for grouping things together.

This is reflected in the way you add custom fields and 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. Like categories and tags, each WooCommerce taxonomy term should be selected for multiple products.
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 yourself: “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 then you need a custom field. 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 ‘Color’, 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.

And if you’re feeling really clever, you can use both 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 that customers can narrow down 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 creating WooCommerce taxonomies and custom fields, and displaying them on a WordPress website. There are also full written instructions below:

How to create a WooCommerce custom taxonomy

The best plugin to create a custom taxonomy for WooCommerce products is Custom Post Type UI. With over 400,000 active users, it’s a hugely popular plugin and is 100% free too!

As well as creating custom post types (which you don’t need to do), Custom Post Type UI lets you add taxonomies to an existing custom post type. This is what you need, as WooCommerce products are a custom post type in WordPress.

You can also create WooCommerce custom taxonomies with the Toolset plugin. I’ve used Custom Post Type UI in this tutorial, but they’re both good options. Whichever plugin you use to create your product taxonomies, you can display them in the front end using WooCommerce Product Table.

Here’s how to use Custom Post Type UI as a WooCommerce custom taxonomy plugin:

  1. How to create WooCommerce custom taxonomy
    Go to Plugins > Add New in the WordPress admin and search for ‘Custom Post Type UI’.
  2. Install and activate the plugin.
  3. Go to the ‘CPT UI’ section in the left of the WordPress admin and click on the ‘Add/Edit Taxonomies’ section:
    1. Add the Taxonomy Slug (ideally 1 word, lowercase).
    2. Add a plural and singular name (label) for your WooCommerce custom taxonomy. This will only appear in the WordPress admin.
    3. Attach it to the Products post type.
    4. Click ‘Add Taxonomy’.
  4. 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 1 or more taxonomy terms for each product, just like with standard product tags.

Displaying WooCommerce custom taxonomies in the front end

Normally, the only way to display custom taxonomies for WooCommerce products is to edit the template files for your and product archive pages. This involves a bit of coding knowledge.

The good news is that there’s a handy plugin to list products in a table along with 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, to your main WooCommerce shop or product category pages, or even to the single product page.

The plugin for displaying custom taxonomies is called WooCommerce Product Table. 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. You can even create WooCommerce tables that only contain products with a specific taxonomy term.

This is much easier than modifying your WooCommerce template files. And even better, you get all the other benefits from using product table layouts such as improved conversion rates.

WooCommerce Product Table
Display extra product data & filters in your store with custom taxonomies

How to create a product table with WooCommerce custom taxonomies

It’s easy to set up WooCommerce Product Table with all the extra product data.

Install WooCommerce Product Table

  1. Get WooCommerce Product Table. Download the 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 Table. 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 having to create such complex shortcodes later on, 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

  1. Install WooCommerce Product Table.
  2. Go to edit any page in WordPress. This is where you’ll add a table listing some or all of your products with the taxonomies.
  3. Enter the shortcode: [product_table]
  4. This will display all your products in a table with standard data. Next, you need to expand the WooCommerce Product Table shortcode to include your custom taxonomies and any other extra data. Each piece of product data will appear in its own column within the table.

There are full instructions for all the available columns in the plugin knowledge base. To get you started, here’s an example of a product table with columns for name, a custom field called ‘Condition’, a custom taxonomy called ‘Color’, price and add to cart button. You need to know the custom field name and the taxonomy slug. You chose these when you created your custom fields and taxonomies earlier in this tutorial.

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

How to display custom taxonomies on the WooCommerce shop page or product category archive

Most people add WooCommerce Product Table to normal WordPress pages. They include these pages in their website navigation structure instead of linking to the built-in WooCommerce category archives.

If you prefer, you can add product tables with custom taxonomies directly to the main WooCommerce shop page or category pages. This is a bit trickier, as you need to add the product table shortcode to the template file in your theme. To make it easier, the plugin knowledge base provides instructions on how to do this.

  1. Install WooCommerce Product Table.
  2. Follow the instructions for adding product tables to the shop or category archive template.

How to show WooCommerce custom taxonomies on the single product page

  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 ID of the product that 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.

Display WooCommerce taxonomies in a filter

Display extra WooCommerce product dataYou can also list WooCommerce custom taxonomies as a filter dropdown above the product table.

You can add a separate filter for each custom taxonomy (plus other data such as attributes, variations, categories and tags – instructions here).

This is how to add 1 filter with the ‘colour’ taxonomy:

[product_table columns="name,cf:condition,tax:color,price,add-to-cart" filters="tax:color"]

Create tables listing 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.

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 ‘color’ and a term with the slug ‘red’. We need to include both in the product table shortcode:

[product_table columns="name,tax:color,price,add-to-cart" term="color:red]

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

Continue customizing your product tables

The WooCommerce Product Table knowledge base contains full details of over 50 options for configuring your product lists. It’s a sophisticated plugin and this tutorial has barely touched the surface of what’s possible.

You can design product tables that will increase your sales with our top 10 tips for WooCommerce conversion rate optimisation.

Have a read through the knowledge base and plan the perfect product table to display your WooCommerce custom taxonomies.

WooCommerce Product Table
Display extra product data & filters in your store with custom taxonomies

Katie Keith

An active member of the global WordPress community, Barn2 Co-Founder Katie loves collaborating with other plugin companies. Her articles have been published on high profile sites including WPTavern, Torque and IndieHackers. She oversees all plugin support and deals with 'Tier 2' support requests about how to use Barn2's plugins in advanced ways.

25 Comments

  1. Rick Nichols
    November 13, 2018 Reply

    I have a question before I buy. Is there a conflict between custom fields and your plugin. My customer would like to replace the default drop down options shown in woocommerce for product variations in a table. His products require some custom fields such as custom printing, specific date and upload customer logo. He sells products with over 500 variations on some products. He is interested in making it easy for a customer to quickly select his selections using variations listed in a table or with drop downs in table format. Thank you.

    • Katie Keith
      November 13, 2018 Reply

      Hi Rick, WooCommerce Product Table fully supports the Advanced Custom Fields plugin and you can display your custom fields as columns in the table. We have also tested with Toolset Types, Custom Post Type UI and Pods and found that they all work nicely with WooCommerce Product Table.

      You can add attribute/variation filter dropdowns above the table or to a sidebar widget. You can also add variation dropdowns to the add to cart column of the product table. However, please be aware that 500 variations for a single product is a HUGE amount of data to load all at once, and may cause performance issues. This would also happen if you listed so many variations on the single product page, but it could be worse in a product table because you are listing multiple products on one page. If this is a problem then you can always disable the variation dropdowns so that customers can click through to the single product page to choose their variations. In the next few months we also plan to add a 'Quick View' option that lets people click on a button to view more information and select variations from a lightbox, so this might be a good option for your customer.

      WooCommerce Product Table has a lazy load option which loads one page of products at a time, so this might help. Please bear in mind that we have a 30-day money back guarantee so you can try the plugin risk-free.

  2. Bob Teree
    March 2, 2018 Reply

    Much of what you discuss could have been done with the old Attribute feature, but now they have removed the ability to have free text strings. Two use cases I have discussed with the WooCommerce team that they have killed recently by removing the ability to have "select" and "text" type Attributes:

    1) Product Cross-Numbers : Every technical product (e.g. engine parts, machine part, etc.) has a product number. Not only that, but it has cross numbers. So a Wix filter will have Baldwin, Napa, Donaldson, Fram, et. al. crosses. They each have their own product number that crosses to each other. Question: How would you recommend displaying this information to a customer in a structured, consistent way? The former Attribute feature allowed this easily. That said, I get that storing 2,000 unique values under an Attribute called: "Other Product Numbers" would pile up the values, but your solution might not be the best solution. I would suggest that you allow, as before, the ability to make an Attribute "Selectable" or "Text". If, text, you should turn off the Attribute value features and simply keep the Attribute as a free text string. What this solution would enable is 1) Enforcement of a consistent Attribute title on the front-end such as: "Other Product Numbers;" 2) It also enforces the person creating products on the back-end a reminder that that value, which would appear in a drop-down of Attributes, would be required (not technically, but via workflow -- namely, it's a configured Attribute name in the drop-down. Without enforcement of the Attribute value, there is no way to ensure a consistent end-user experience on the front-end. Now we will have various product creators creating ad hoc (what you call "custom") Attribute names such as "Other Product Numbers," "Crosses," "Other Numbers," not to mention mispellings. When you have 1,000's of products, you can see that there is no way to enforce this on the backend with multiple product creators. I would argue that you threw the baby out with the bath water. You solved one problem (proliferation of Attribute values), but killed a very valuable feature that allowed free text strings against an enforce Attribute name (e.g. "Other Product Numbers"). I would also argue that you might have lost sight of the original use-cases that built the Attribute feature in the first place and why they allowed text strings versus only a tag structure. Most of my clients are parts suppliers and cross-reference numbers are the life-blood of optimal SEO and marketing. Now we have no way to do this, but we did. So the ability to enforce consistent Attribute names is no longer available. To accuse me of product misuse, is simply not productive. There is no other way to use WooCommerce for the parts industry. Tags and Categories don't work. Free text in the product description and Free text via the Custom Attribute is too loosely-goosey to enforce a consistent backend workflow and consistent front-end experience. Take this as an example from a filter on Amazon. I used to be able to mimic this 100%. Now it's impossible in a scalable way. Practically every single product in Amazon requires this feature! Please tell me how I am supposed to mimic this?

    2) Maintaining consistent private notes: The same old feature was able to accomplish this, just a different use case. Attribute enforcement of a private value (e.g. Source). This is the private source for a product I sell that has replenishment details. Yes, this might not be a color, size, etc. But a critical piece of our business. People that maintain complex catalogs of products with multiple suppliers, need to keep track of where they buy their products and other details. Again, this was supported via the no-publish feature, which you still have, but now their is no way to enforce the Attribute name (just like #1).

    I get that there was a proliferation of Attribute values. But the way to fix it would be to align the following:

    >> If Attribute type was "text", turn off the ability to create and manage formal values (i.e. the backend is just a text string)
    >> If Attribute type was "select," the keep the ability to create and manage formal values (e.g. color, size, etc.)
    >> Keep the ability as you have today of publishing or not publishing the value.

    My parts customers are pissed to no end. This will be hours and hours of work to clean up 10,000 products across 10 customers and even then, there is still no way to enforce Attribute names on the front-end. We may ditch WooCommerce and migrate off the platform as this is unworkable for us and not sure if any plugin can fix this without complicating the back-end and front-end code.

    I would venture to guess, that EVERY single product listing on Amazon could not be replicated in WooCommerce due to the above. Every product has UPC, NSN, ASIN, etc. etc. product codes. There is NO way to replicate this functionality in WooCommerce now and that is a massive issue. I don't think users have actually realized what happened and you will receive more and more complaints related to this. It took me a while to figure out what broke.

    Thank you for listening and your patience. This is such a big issue for us that it may require us to find a new eCommerce plugin to WooCommerce as it seems the engineers/product folks have broken a feature more than fixed it and have completely made it impossible to mimic the most basic of product listings (enforced Attribute names, with free text values).

    • Katie Keith
      March 3, 2018 Reply

      Wow, I think that is the most in-depth comment anyone has ever left on this blog! You're right, it's a shame that you can't use attributes to do all these things. WooCommerce seems to think that an attribute is just for listing data about products, when some sites were using them for much more than this.

  3. Guillermo
    February 1, 2018 Reply

    Thanks for the quick reply!
    I have done what you suggested and worked perfectly.
    After that I bought your Product Table plugin and it is awesome, thank you very much! I probably contact you in a few weeks for other things I will need in the page... like wholesale password store...
    Cheers,
    Guillermo

  4. Guillermo
    January 30, 2018 Reply

    Hello,
    I needed exactly this: Extra Product Data & Filters!!! and you helped me do it finally!! Thank you!!

    I have a site that has more than 1000 products and I have about 10 custom fields and other 10 taxonomies, I am trying to import the products through Products/import and I am able to do it through a cvs file but I don't see the mapping for the created custom fields and taxonomies.

    Is there a way to import all the custom fields and taxonomies? or after I import the products I have to enter the fields and taxonomies by hand?

    Cheers!
    Guillermo

    • Katie Keith
      January 30, 2018 Reply

      Hi Guillermo, glad it was helpful. The built-in importer doesn't support custom fields and taxonomies. You can do this using the official Product CSV Import Suite plugin, which has more features.

Please share your thoughts...

Your email address will not be published.