1. Home
  2. Knowledge Base
  3. WooCommerce Product Table
  4. Product Table Shortcode Options
  5. WooCommerce Product Table – Full list of options

WooCommerce Product Table – Full list of options

This is a list of all the options available in WooCommerce Product Table, with links to full instructions for each option. You can use these to configure the [product_table] shortcode in many different ways.

* indicates options that can be set as defaults on the plugin settings page. Other options can only be controlled directly in the product table shortcode. 

Product table columns

  • columns* – sets the columns in the table. There are options to customise or remove the column headers

Buttons

  • cart_button* – sets the style of the add to cart buttons
  • add_selected_button* – controls the location of the ‘Add Selected to Cart’ button
  • show_quantity* – shows or hides the quantity selector next to the add to cart button
  • ajax_cart* – disables or activates ajax add to cart behaviour
  • button_text – changes the button text if you are using a button column to show a link to the single product page

Choosing which products appear in the table

  • category – lists products from a specific category
  • tag – lists products with a specific tag
  • term – lists products with a specific custom taxonomy term
  • cf – lists products with a specific custom field value
  • year – lists products published in a specific year
  • month – lists products published in a specific month
  • day – lists products published on a specific day of the month
  • status – lists products with a specific status (e.g. Published)
  • exclude – excludes specific products from the table based on ID
  • include – lists specific products in the table based on ID
  • exclude_category – excludes entire categories of products from the table
  • rows_per_page* – sets the number of products on each page of the table
  • product_limit* – sets the maximum number of products that can appear in the table

Sorting & ordering

  • sort_by* – controls how the products are sorted when the table first loads
  • sort_order* – sorts the table in ascending or descending order
  • filters* – add filter dropdown lists above the table (also see filter widgets)

Control elements above & below the table

  • search_box* – shows, hides or positions the keyword search box
  • reset_button* – shows, hides or positions the reset link
  • page_length* – shows, hides or positions the “Show <x> products” dropdown list
  • totals* – shows, hides or positions the product totals (e.g. “Showing 1 to 10 of 50 products”)
  • pagination* – shows, hides or positions the pagination buttons (previous, next etc)
  • paging_type* – sets the pagination style
  • show_footer* – shows or hides the footer row of the table
  • scroll_offset* – changes the height that the page scrolls to when you move between pages in the product table

Sizing & styling

Mobile visibility & responsive options

  • wrap – controls whether or not content is wrapped onto multiple lines
  • priorities – controls which columns are hidden on screen sizes when there are too many to fit on the page
  • column_breakpoints – provides fine-grained control over the breakpoints for each column when viewed on smaller screen sizes
  • responsive_control – controls the + icon which shows hidden rows
  • responsive_display – sets whether hidden rows are visible or hidden, or open in a modal window

Miscellaneous options

  • variations* – controls how variable products appear in the table
  • lazy_load* – improves performance by loading the overall page before the product table, and loading 1 page of products at a time
  • shortcodes* – displays content generated by other shortcodes in the product table (e.g. buttons or embedded audio or video players)
  • links* – sets which columns in the table are clickable
  • search_on_click – controls whether clicking on a category, tag or custom taxonomy will filter the table or link to the relevant archive page
  • date_format – sets the date format for any date columns
  • date_columns – specifies which columns contain dates, so that the column can be sorted by date correctly
  • no_products_message – controls the text that appears if no products are found when the table first loads
  • no_products_filtered_message – controls the text that appears if no results are found when a user searches or filters the table
  • numeric_terms – fixes any issues if you’re using numeric slugs for your categories or taxonomies

Product table shortcode examples

To get you started, here are some popular examples of different ways to use WooCommerce Product Table.

Basic usage displaying all products (see below for full list of columns):
[product_table columns="name,short-description,tags,price,add-to-cart"]

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:
[product_table exclude_category="clients"]

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"]

What else can I do?

Please also see our articles on advanced usage, which include advice on adding product tables to the main shop page or category archives, translating the product table into other languages, developer documentation, and more.

Was this article helpful?

Related Articles