User Guide

Search limit to:






Product labels & badges - Metafields

by Admin on Feb 26, 2025

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 store selling false eyelashes might want to show the lash length (e.g., "11mm" or "15mm") directly on the product image. While you can manually assign a text label to products, it maxes out at 50 products. Using metafields allows unlimited products to display the same label dynamically, making it a more scalable solution.

(Image from real Eurus customer: https://www.minkmuse.co.uk/)

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

Step 1: Create a Product Metafield

  • Go to Shopify Admin > Settings > Custom Data > 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.

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.

Step 4: Add a 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:
    • 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 field, as specified in this guide

  • Click Save.

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