> For the complete documentation index, see [llms.txt](https://story.groupthought.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://story.groupthought.com/story-theme-v1/collections/badges.md).

# Badges

Add custom badges using metafields in Story 2:

![](/files/cYhR2c2CW99Jnrq2u5gS)

Each product can have a custom and unique badge when using metafields.&#x20;

### How to setup

#### TLDR;

The most important part of setting up this metafield is use the namespace and key of:

```json
theme.badge
```

See example here:

![](/files/L3Xb5z32bkwnaD1jy9xp)

### Detailed version

Start in your Shopify Admin -> Settings and choose Metafields from the left panel and then click on **Products**:

![](/files/ciMq1FK443C5tJ5wpMET)

Choose the **Add definition** button:

![](/files/Z7y7tKKPZk0RZhGi1HZz)

Next, add a Name for the metafield, any name is fine. The namespace and key **must be modified**. Be sure to change from the default entry:

![Change the default Namespace and key](/files/dwEgj0Fa8982FeOiiptG)

Change to:

{% hint style="success" %}
theme.badge
{% endhint %}

Example:

![Don't skip this step](/files/L3Xb5z32bkwnaD1jy9xp)

Add a description and choose **Select content type**.

&#x20;Choose **Text** and then **Single line text**:

![](/files/1FwbrdFM6uGhRrgPXeAP)

Single line text:

![](/files/FQj3FPakzktwC7MxeECI)

Save your new product metafield. Verify that the metafield is called:

{% hint style="success" %}
product.metafields.theme.badge
{% endhint %}

![](/files/r5OoZ0dhnWvQSZZUyRry)

### Product setup

The 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:

![](/files/ZfYFcv6zQFrlSA4TGOmo)

Update the Product badge metafield with the custom badge name:

![](/files/t8XwWeDoEGlHxZjaI3Fd)

Save your product and preview on any product grid view like Collection pages:

![](/files/cYhR2c2CW99Jnrq2u5gS)
