> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://omnithemes.crisp.help/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to set up Product labels and badges using Metafield?

If you need to display a product-based or variant-based label on many products, metafields help you bypass Shopify’s 50-product limit for manually applied labels. Wanna know how to do so? Kindly follow the step-by-step below on how to set it up

### Step 1: Create a Product Metafield
* Go to **Shopify Admin** > **Settings** > **Metafields and metaobjects** > **Products**.
* Click **Add definition** and create a new metafield.
* Set the metafield **Type** to **Single line text - one value** (this is the only accepted type).
* Save the metafield.
If you need more detailed guidance, check this out 👉 [How to create Product metafields.](https://support.omnithemes.com/blogs/faqs/metafields-dynamic-source#index=2)
| ⚠️ **__*Note*__**__*:*__ If you want your labels & badges to change dynamically for each product variant, just create a Variant metafield in this step. And other steps remain the same.

### Step 2: Input Metafield Values
* Go to **Shopify Admin** > **Products**.
* Click on a product you want to add a label for.
* Scroll to the **Metafields** section and enter the label text for the created metafield.
* Save the product.

### Step 3: Enter the Metafields key in Theme Settings
* Open the **Theme Editor**.
* Go to **Theme Settings** > **Product Labels and Badges**.
* In the **Metafields used in labels** field, enter the **namespace and key** of the created metafield.
* To add multiple custom labels, enter each metafield key on a new row.
* Click **Save**.
![](https://storage.crisp.chat/users/helpdesk/website/-/2/d/9/f/2d9fa4e30c652400/image_cczkz.png)

### Step 4: Add a block under the Product Labels and Badges section
* In the **Theme Editor**, go back to the **Sections&#160;**tab.
* Under the **Overlay** group, click on **Product Labels and Badges**.
* Click **Add Block** and choose one of the following:
    * **Text Label**
    * **Sale Label**
    * **Sold Out Label**
* Click on the newly added block to edit it.

### Step 5: Set Up the Label Content
* In the **Content** field of the label block, fill in the metafield key you entered into Theme Settings in Step 3 above, using the format:
| **{metafield_key}**Example: {custom.label} |
**⚠️ *Note***: The metafield key is a variant, you can add other variants into the **Content&#160;**field, as specified in [this guide](https://support.omnithemes.com/blogs/overlay-group-1/user-guide-product-labels-badges#index=3). 
* Click **Save**.
![](https://storage.crisp.chat/users/helpdesk/website/-/2/d/9/f/2d9fa4e30c652400/image_19wiom.png)

Your product labels will now dynamically display based on the metafield values you entered.