> For the complete documentation index, see [llms.txt](https://ta-product-labels-and-badges.tech-arms.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ta-product-labels-and-badges.tech-arms.io/label/create-a-text-label/how-to-create-a-label-or-badge-that-shows-product-metafield-content-automatically.md).

# How to Create a Label or Badge that Shows Product Metafield Content Automatically

Suppose you have 100 products using the same metafield — with each product having a different value — and you want to display that value on a label or badge. In that case, you can easily do this with just one label, instead of creating 100 separate labels or manually setting up each product.

This guide will walk you through how to set this up using **Metafield Variables**.

To learn more about Shopify Metafields and how to set them up, check out this article: [How to Create Product Metafields in Shopify: A Step-by-Step Guide](/faqs/pro-tips/how-to-create-product-metafields-in-shopify-a-step-by-step-guide.md)

**Notes:**

* This feature applies to **Text Label/Badge** types that allow content customization.
* This feature is available from the **Pro** plan.

***

### 1. Step by step guide <a href="#id-1.-step-by-step-guide" id="id-1.-step-by-step-guide"></a>

**Step 1:** Navigate to the editing interface of the Label/Badge Text you have created.

<figure><img src="https://4175789379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9hvZuxfHGxWaI6LN7rVY%2Fuploads%2Fgit-blob-3f7e5a19ed224bfc1ece054724bbf084379a5426%2Fimage%20(59).png?alt=media" alt=""><figcaption></figcaption></figure>

**Step 2:** Scroll down to the **Content** section → click **Add Variable** → select **Metafield**.

<figure><img src="https://4175789379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9hvZuxfHGxWaI6LN7rVY%2Fuploads%2Fgit-blob-38ff01cffcc868e0e4b7df517873fc9d903ea836%2Fimage%20(61).png?alt=media" alt=""><figcaption></figcaption></figure>

\
**Step 3:** Choose the Metafield you want to use. The label/badge content will automatically pull the value from the Metafield of each product.

<figure><img src="https://4175789379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9hvZuxfHGxWaI6LN7rVY%2Fuploads%2Fgit-blob-798da65d8a3a3bb032555b752fa8f3fedd47bb3a%2Fimage%20(62).png?alt=media" alt=""><figcaption></figcaption></figure>

\
**Step 4:**\
Save the changes and check the display on your Storefront.

<figure><img src="https://4175789379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9hvZuxfHGxWaI6LN7rVY%2Fuploads%2Fgit-blob-c19aeef70a16c31ebe3c0af91211d81f06ebe2f6%2Fimage%20(63).png?alt=media" alt=""><figcaption></figcaption></figure>

### 2. Pro Tips

* Ensure that Storefront API access is turned on in the Metafield.

  <figure><img src="https://product-labels-docs.tech-arms.io/~gitbook/image?url=https%3A%2F%2F340561356-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNvBHInFsm4Ct08xZ2f0e%252Fuploads%252FqMoWxkPK6DfHfO15398t%252Fimage.png%3Falt%3Dmedia%26token%3D95b9acae-94a8-4779-a9c6-92a769aff176&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=df173af8&#x26;sv=2" alt=""><figcaption></figcaption></figure>
* You can customize the **font style** and **color** of the Metafield content using the style settings available in the app.
* You can use both **Product Metafields** and **Variant Metafields**.

  <figure><img src="https://4175789379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9hvZuxfHGxWaI6LN7rVY%2Fuploads%2Fgit-blob-3406e747ba278c886f96290b97637ac04eca6ac2%2Fimage%20(146).png?alt=media" alt=""><figcaption></figcaption></figure>
* If you use **Variant Metafields**, the label/badge will **not** display on the product card.
* Metafield variable only works with metafields that have **one value.**
