Custom badges
Promote products with your own custom badges that you create and assign to individual products
Last updated
Promote products with your own custom badges that you create and assign to individual products
Last updated
Story theme allows you to create your own unique product badges to associate with any of your products. When using Shopify's dynamic source feature (also known as metafields), you can create individual product badges for any of your products.
Once a badge metafield is defined (see instructions below), any of your products can display a custom badge. There are no limits to the number of badges you can create and use. All your products will be able to display a custom badge or use the built-in badges for sales and out-of-stock inventory.
The most important part of setting up this metafield is to use the namespace and key of:
See the example here:
The first step is to define a custom metafield that Story theme supports.
Start in your Shopify Admin -> Settings and choose Metafields from the left panel and then click on Products (click images to zoom):
Choose the Add definition button to begin. Choose a name, we'll use badge. Next, we will use a custom namespace. This is required for custom badges. Change the default namespace from my_fields
to theme
Change to:
theme.badge
Example:
Add a description and choose Select content type.
Choose Text and we will use Single line text which is the default choice:
Save your new product metafield. Now we can use this custom theme.badge metafield with any of our products.
Now that our custom metafield has been defined, we can easily add a custom badge to any of our products.
The next and final step is to edit any of your products in the Shopify Admin -> Products and update the new badge metafield. Scroll to the bottom of the product setup page:
Update the Product badge metafield with the custom badge name:
Save your product and preview on any product grid view like Collection pages: