---
title: How to Display Dynamic Product Data in a Tab
description: Show different data per WooCommerce product in one global tab using shortcodes, such as stock info or a custom field.
url: "https://wpfactory.com/docs/display-dynamic-product-data-in-tabs/"
updated: "2026-09-25"
category: How to
---

# How to Display Dynamic Product Data in a Tab

## Show live product data in a global tab

A global tab in [Additional Custom Product Tabs for WooCommerce](https://wpfactory.com/item/product-tabs-for-woocommerce-plugin/) shows the same content on every product, but shortcodes let that one tab display data that is different for each product, such as the SKU, price, or a custom field. This is a free feature and a fast way to add the same block of dynamic information store-wide.

### Before you start

- The **Custom Tabs: All Products** section enabled, with a tab that has a Title and Content.
- The shortcodes are covered in full in the [product tabs shortcodes reference](https://wpfactory.com/docs/).

### Example: add a stock info line to every product

1. Go to **WPFactory > Product Tabs > Custom Tabs: All Products**.
2. Set the tab **Title** to something like `Product info`.
3. In **Content**, add:
   ```
   Stock: [alg_wc_pt_product_function name="get_stock_quantity" on_empty="In stock"]
   SKU: [alg_wc_pt_product_function name="get_sku"]
   ```
4. Save. Each product now shows its own stock number and SKU in that tab.

### Example: show a custom field

If your products store a value in a custom field, print it with the product meta shortcode:

```
[alg_wc_pt_product_meta key="_my_custom_field" before="Material: " on_empty="Not specified"]
```

The `before` text only appears when the field has a value, and `on_empty` gives a fallback when it does not.

### Useful product functions

| name value | Outputs |
| --- | --- |
| `get_name` | Product name |
| `get_price_html` | Formatted price |
| `get_sku` | SKU |
| `get_description` | Long description |

### Troubleshooting

- **Nothing shows for a product:** that product has no value for the method or field. Add an `on_empty` attribute for a fallback.
- **The tab itself is missing:** a tab needs both a Title and Content to render.

### Get more control

Dynamic content through shortcodes is free. When you want more than one global tab to hold it, [Additional Custom Product Tabs for WooCommerce](https://wpfactory.com/item/product-tabs-for-woocommerce-plugin/) Pro removes the limit. [See what Pro unlocks](https://wpfactory.com/item/product-tabs-for-woocommerce-plugin/).

Related articles

- [How to Show or Hide a Product Tab by Product or Category](https://wpfactory.com/docs/show-hide-product-tabs-by-product-category/)
- [How to Reset a Product Tabs Settings Section](https://wpfactory.com/docs/reset-product-tabs-settings/)
- [How to Create Multilingual Product Tabs with WPML or Polylang](https://wpfactory.com/docs/multilingual-product-tabs-wpml-polylang/)
- [How to Add a Tab for Each Variation on Variable Products](https://wpfactory.com/docs/product-tab-variations/)
- [How to Add a Custom Tab to a Single Product](https://wpfactory.com/docs/custom-tab-per-product/)
