User Guide

Search limit to:






Product labels and badges - Metafields
Ask AI

1. Why use metafields for Product labels?

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. 

For example, a sports store may want to display a skill-level label such as “Beginner Friendly” directly on product cards for items like roller skates or protective gear. While Shopify allows you to manually assign text labels, this approach is limited to 50 products. By using metafields, the same label can be applied dynamically across unlimited products or variants, making it far easier to scale and maintain as your catalog grows.


2. How to set up labels & badges using metafields?

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.

 ⚠️ 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 Product labels and badges metafield, enter the namespace and key of the created metafield.
  • To add multiple custom labels, enter each metafield key on a new row.
  • Click Save.

STEP 4: Add a label block under the Product labels and badges section

  • In the Theme editor, go back to the Sections tab.
  • Under the Overlay group, click on Product labels and badges.
  • Click Add block and choose one of the following blocks:
    • Pre-order label
    • New product label
    • Text label
    • Sale label
    • Sold out label
  • Click on the newly added block to edit it.
  • Click Save

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}

 

 

 

 

 


 

 

 

  • Click Save.

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