Shortcode option / shortcode attributes

Using shortcode attributes included in WCPT you can save a lot of time and effort by modifying any shortcode’s query on the fly. For example:

If you want to reuse the same shortcode to show category clothing in one table and shoes in another table you can do this:

[product_table id=”123″ category=”Clothing”]

[product_table id=”123″ category=”Shoes”] 

To display only specific products, chosen by post ID, in a table:

[product_table id=”123″ ids=”111, 222, 333″]

As you can imagine, this saves a lot of work as you can create a table and then re-use it to display different results based on different queries that are generated using the shortcode attributes.

You can find the list of shortcode attributes next to the shortcode on any product table editor page.

Some shortcode attributes are marked PRO and are available in the premium version of the plugin WCPT PRO

Filter by tags: Just you the taxonomy shortcode attribute for this and target the product_tag taxonomy [product_table id=”123″ taxonomy=”product_tag: Tag 1, Tag 2″]

Filter by attribute: [product_table id=”123″ attribute=”Attribute 1: Term 1, Term 2 | Attribute 2: Term 3, Term 4″]