# 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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://story.groupthought.com/story-theme-v1/collections/badges.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
