Product Table filters & widgets
WooCommerce Product Table comes with two types of filters that make it easy for customers to search for products:
Filter dropdowns appear above your table and let customers filter products by category, tag, attribute, variation or taxonomy.
Selecting your filters
On the plugin settings page, scroll down to Product filters where you will find 3 options:
- Show based on table content
Show based on table content
Shows product filters based on the columns displayed in the table. Any filterable column in your table - any variations displayed in the Buy column - will be displayed as filters.
If you want to set this option for individual tables, you can add
filters="true" to the product table shortcode.
Use the Custom option to specify your own filters . This should be a comma-separated list of filters, and the format is similar to the columns option.
You can choose any combination of the following:
categories- The product categories filter
tags- The product tags filter
- Any product attribute - e.g.
att:colorwould display the Color attribute filter (use
att:followed by the attribute slug)
attributes- Displays all product attributes, one filter per attribute
- Any taxonomy - e.g.
tax:product_regionwould display a filter for the
tax:followed by the taxonomy slug)
Enter the filters as a comma-separated list:
If you want to set this option for individual tables, you can add the same list to the
filters option in the shortcode. E.g.
How to rename the filters
To set a custom name for the filter, add a colon : after the filter name followed by your heading. For example:
categories:Product Categories, att:color:Which Colour?
If you don't set a name for the filter but the filter also appears as a column in the table, then renaming the column will also rename the filter.
If neither of the above apply, then the filter name will be generated automatically.
My filters show options that don't relate to products in the table
If you are using lazy load, then the filters will show all possible options, even ones that don't relate to products in the table. With lazy load, the plugin hasn't loaded the full content of the table and therefore doesn't know which filter options apply to the current products.
If this is a problem due to the way your store is structured, then here are some suggestions:
- Depending on the number of products in your store, you can disable the lazy load option. If you are not using lazy load then the filter dropdowns will only show options relating to the products in the current table.
- If you can't disable lazy load, you could create a custom taxonomy and use this as a filter instead. For example, if you are listing clothing products in a table and want to add a categories filter for the clothing categories only, then you could create a 'Clothing' taxonomy and add each sub-category that you need to be able to filter by. You can then add a filter dropdown for this taxonomy, instead of using the actual categories filter.
Can I control the order of the items in the filter dropdown?
Most types of filter are ordered alphabetically and there are no options to change them. If you're using the filters to list something where alphabetical sorting isn't appropriate (e.g. dates), then you could add numbers before each item to control the order. For example, if you're using categories to filter by month, then you could name your categories '01 - January', '02 - February', and so on.
The only exception is attribute filters, which are sorted in a different way. Please see the separate instructions about ordering attribute filters in the product table.
Can I show filters below the table?
The filters are displayed above the table by default, but if you have positioned the search box below the table then the filters will also appear below the table.
If you set the search box to appear above and below the table, then the filters will do the same.
Can I list categories and sub-categories as separate filter dropdowns?
The plugin lists all categories in a single list. The list is nested/hierarchical so that you can see which are the parent categories and which are child categories.
If you would like to list each level of category as a separate filter, then you can do this by using our Product Filters plugin. This lets you choose whether to display category filters as a single dropdown or multiple dropdowns.
Can I add custom field filters?
It's not possible to filter by custom field because of the way WordPress handles and stores custom field data in the database. As an alternative, we recommend storing the data as custom taxonomies as these can be filtered by the plugin. Custom taxonomies behave like categories and are designed to group and sort products.
Can I add checkbox filters above the table?
"Show based on table content" isn't working
If you select "Show based on table content", the filters will only appear if your table contains any filterable columns, such as categories or tags.
If your table does not include any columns that can be filtered, then no filters will appear. Please see the instructions above.
Attribute filters not working
Make sure you have added your attributes globally in Products → Attributes. If you create attributes individually for each product then they will act in a standalone way and can't be used to group products in the filter dropdowns.
WooCommerce Product Table comes with its own version of the Shop widgets that come with WooCommerce. These are:
- Product Table: Filter Products by Attribute - Filter the products in the table by selecting one or more attributes.
- Product Table: Filter Products by Price - Adds a price range slider which displays products in the selected price range.
- Product Table: Filter Products by Rating - Refine the product table to show products based on review/star rating.
- Product Table: Active Product Filters - Display the active filters so customers can see which filters are enabled.
Product Table widgets vs. WooCommerce widgets
The reason for duplicating the WooCommerce widgets with a separate "Product Table" version is because the WooCommerce widgets only work on Shop pages built into WooCommerce. These include the main storefront, product category pages, search results page, and so on. If you try to use a WooCommerce widget on a regular page, it won't work.
Our Product Table plugin allows you to display tables anywhere on your site, and you may want to display filter widgets alongside those tables to filter the products. With that in mind, we built the Product Table widgets to work alongside regular posts and pages.
If your product table appears on a WooCommerce "Shop" page, you can use the regular WooCommerce widgets and they will work as expected.
- For WooCommerce pages (Shop page, category page, search results page, etc) - use the WooCommerce Filter by... widgets.
- For regular pages, posts and anything that is not a special WooCommerce page - use the Product Table: Filter by... widgets.
You can add the Product Table filter widgets to any widgetized area, such as a left or right sidebar. Go to Appearance → Widgets to configure your sidebar.
How do I add categories or tags as a filter widget?
WooCommerce comes with widgets for product categories tags. These aren't filters because instead of refining the existing list of products, clicking on them takes you to the relevant category or tag archive page.
If you are displaying product tables on a shop pages, you can add these widgets to your sidebar. Clicking on a category or tag in the widget will take you to the relevant category/tag archive page, which will contain a product table.
A better option is to use our Product Filters plugin to add proper category and tag filters. This is much more flexible as you can display the filters in a wide range of styles including radio buttons, checkboxes, dropdowns, clickable images, and tag clouds.
My attributes aren't showing in the filter widget
If you can't select your attributes from the dropdown in the Filter By Attribute widget, then this is because you have added them to individual products instead of creating them as global attributes. You need to add them as global attributes via the Products → Attributes menu.
WooCommerce Product Filters plugin
If you purchase our WooCommerce Product Filters plugin, you can add a wider range of filters to your product tables, including image filters, swatches, review rating filter, stock status and lots more.
Use both plugins together to add lightning fast AJAX-powered filters above or alongside your product tables.
These instant filters are more advanced than the ones that come with WooCommerce itself, and filter the products instantly without reloading the page.
You can display the filters above the product table, in a sidebar widget, or in a mobile-friendly slide-out panel like this:
Learn more about using Product Table with WooCommerce Product Filters.
Filtering before the table loads
This article describes the options for customers to filter the table to refine the list of products after the table loads. If you want to create tables listing specific products based on category, tag, customer field, search term, etc, when the table is first displayed, check out the following articles:
- Load tables based on category, tag, attribute, custom field, date, or taxonomy
- Load tables based on search term