Creating a product table
To create a WooCommerce product table, simply add the shortcode
[product_table] to any page, post, widget or other editable area in the WordPress admin.
The default shortcode will list all your products. The shortcode is very flexible and has a wide range of options. The articles and examples below will show you how to use all the options.
Product table options – complete list
- Column options
- Add to cart buttons
- Product variations
- Filter dropdowns
- Changing how the product table is sorted & ordered
- Showing/hiding products with a specific category, tag, taxonomy term, date, ID, etc.
- Controlling the elements above & below the table (e.g. search box, totals, reset button & pagination links)
- Changing the number of products in the table
- Lazy load (AJAX) option for stores with many products
- Displaying shortcodes from your theme & other plugins in the table
- Column width & image size
- Responsive options
- Links in the product table
- Description length
- Date format
- Customising the ‘No Products’ message
You can also view the Advanced section to learn about styling or translating the product table, adding product tables to the WooCommerce shop and category pages, developer documentation and more.
Product table shortcode examples
To get you started, here are some popular examples of different ways to use WooCommerce Product Table below.
Basic usage displaying all products (see below for full list of columns):
Display products from a single category (use the category slug or ID):
[product_table columns="sku,name,description,tags,price,add-to-cart" category="ebooks"]
Display products from several categories. This example shows products in the “ebooks” category or the “audiobooks” category:
[product_table columns="id,name,categories,price,add-to-cart" category="ebooks,audiobooks"]
Display products that belong to several categories. This example shows products that are in the “featured”, “course”, and “health” categories:
[product_table columns="name,short-description,tags,price,add-to-cart" category="featured+course+health"]
Exclude products from a category. This example excludes products in the “clients” category:
Display product image. Defaults to 50 by 50 pixels, but you can specify a custom image size if you wish:
[product_table columns="image,name,price,add-to-cart" image_size="80x80"]
Choosing custom column headings:
[product_table columns="name:Product Name,reviews:Rated,date:Added On,price:Unit Price"]