Display shortcode in the product table is the best way to show the shortcoded content related to your products such as song preview.
This feature is especially important for the downloadable products such as music. A shortcode is assigned to them in the description of WooCommerce product page.
The Woocommerce product table plugin is compatible with displaying shortcodes in the description of the product table. The related content will automatically displayed in the table as soon as assigning a shortcode to a product.
For example, let’s check displaying shortcode of some songs in a music store by product table:
Assign shortcode to the products in WooCommerce
To assign a shortcode to the WooCommerce product page, you have to add some products.
In each product, you are able to add shortcode to the description part as we assigned for some songs below:
After assigning these shortcodes to your products, you are able to display them in the product table, directly.
Display shortcode in the product table
To display shortcode in the product table, you have to add “Description” column to the product table in the “Columns” tab:
To help you control and manage columns in the product table, you can edit columns in the list by:
- Changing the order
- Selecting in which screen you want to display the column
- Changing the column name
For example, as we are going to display the song preview in the “Description” column, it is a good idea to replace this name by “Preview”.
By getting help from “How to make an audio Woocommerce product table for an online music store”, before, you can edit any part of this product table such as “Query“, “Searchbox & Pagination“, “Template” and “Setting“.
Finally, you need to publish this song table to see how the shortcode are displaying in your online music store:
As you can see in the above picture, the preview of all songs which we had assigned their shortcodes to the Woocommerce Product page is displayed in the product table under the “Preview” column.
Note: If you have any problem in publishing your product table as a WordPress or Woocommerce page, please refer to “How to insert product table shortcode in wordpress” and “How to replace shop page and archive page with product table”.