User Guide

Search limit to:







Product labels & 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 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 > Metafields and metaobjects > Products.
  • Click Add definition and create a new metafield.
  • Set the metafield Type to:
    • Single line text - One value (Each product/variant holds a single label value).
    • Single line text - List (Each product/variant can hold multiple label values, displayed as separate labels up to the limit you set in Step 4).
  • 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 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: Set how many metafield labels appear on a product card

A product with many values in its list metafield can clutter the product card. In the same Theme Settings > Product Labels and Badges panel, cap how many are displayed – with separate limits for desktop and mobile:

  • Max metafield labels display on product card – the desktop limit. Range 1–5, default 3.
  • Max metafield labels display on product card (mobile) – the mobile limit. Range 1–3, default 1.
  • Check a product with a long metafield list to confirm the cap works as expected.
  • Click Save.
⚠️ Note: Labels are shown in the order they appear in the metafield, and the cap simply truncates the list – it does not pick and choose. So put your most important value first. If the metafield has fewer values than your limit, all of them are shown. If it has no values at all, no badge and no empty container is rendered.

Step 5: 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 6: 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.