1. Home
  2. Knowledge Base
  3. WooCommerce Product Table
  4. Advanced Usage
  5. Adding product tables to the category archive template

Adding product tables to the category archive template

While WooCommerce Product Table is primarily designed to be used on standard WordPress pages, it can also be used on product category/archive pages by overwriting the product archive template in your theme. This will allow you to automatically display product tables when people view a category page, instead of the usual category layout.

How to add product tables to category archives

You can download an example ‘archive-product.php’ template from this link. Copy this into your theme (or child theme if you have one) under a folder named “woocommerce”, in the following location: /wp-content/themes/<my theme>/woocommerce/archive-product.php. You will then see product tables on your category pages, displaying products from the correct category.

You may want to modify the shortcode in the template to suit your requirements – for example, to select which columns are displayed. Please see our article on Creating Product Tables for instructions.

Using filter widgets on product category archives

WooCommerce filtersWooCommerce Product Table comes with its own set of product filter widgets which you can add to a widgetized area such as a sidebar. These only work for product tables on normal pages and posts. They do NOT work for product tables that have been added to the category archive template.

To use filter widgets on category archives, you need to use the built-in WooCommerce filter widgets instead of the dedicated product table widgets. You can find these in Appearance > Widgets. They start with ‘WooCommerce’ instead of ‘Product Table’ (see screenshot).

 

Was this article helpful?

Related Articles