Shortcodes
ProductBay uses WordPress shortcodes to embed product tables on any page, post, or widget area.
Basic Usage
After creating a table, you'll receive a shortcode:
[productbay id="1"]Paste this shortcode into any page or post to display the table.
Parameters
| Parameter | Required | Description | Example |
|---|---|---|---|
id | Yes | The table ID to display | [productbay id="1"] |
INFO
Currently, the shortcode accepts a single id parameter.
How to Embed
Block Editor (Gutenberg)
- Add a new Shortcode block
- Paste the shortcode:
[productbay id="1"] - Publish or update the page
Classic Editor
- Paste the shortcode directly into the editor content
- Publish or update the page
Widgets
- Go to Appearance → Widgets
- Add a Text or Custom HTML widget
- Paste the shortcode
- Save the widget
Page Builders
Most page builders (Elementor, Beaver Builder, Divi, etc.) support WordPress shortcodes. Look for a "Shortcode" element or module and paste the code.
Multiple Tables on One Page
You can embed multiple tables on the same page by using multiple shortcodes:
<h2>Sale Products</h2>
[productbay id="1"]
<h2>New Arrivals</h2>
[productbay id="2"]Each table is rendered with instance-scoped CSS, meaning their styles won't conflict with each other.
Finding the Shortcode
There are two ways to find a table's shortcode:
- Table Dashboard — The shortcode is displayed in the "Shortcode" column. Click it to copy.
- After Creating/Editing — The shortcode is shown on the Finish step of the wizard.
Troubleshooting
Table not showing?
- Verify the table ID is correct
- Check that the table status is Published (Private tables won't render for non-admin users)
- Make sure WooCommerce is active
Empty table?
- Verify your product source has matching products
- Check that products are published in WooCommerce
- Review any query modifiers (stock status filters, price ranges, excluded IDs)
Admin Notice
If a table is set to Private, administrators will see a yellow notice saying the table is private. Regular visitors will see nothing.