> For the complete documentation index, see [llms.txt](https://docs.webexp.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.webexp.dev/drift-shopify-theme/drift-studio/metafields.md).

# Metafields

How to use the metafields DRIFT Studio supports.

Metafields are extra data you attach to products, beyond the standard title/price/description. DRIFT Studio uses them to power features that wouldn't fit into Shopify's default product fields.

## What metafields DRIFT Studio uses

| Metafield               | What it does                                                                             | Type                 |
| ----------------------- | ---------------------------------------------------------------------------------------- | -------------------- |
| `custom.badge`          | Shows a custom text badge on the product card and PDP                                    | Single line text     |
| `custom.size_chart`     | Shows a size chart image in a modal on PDP + quick-add                                   | File → Image         |
| `custom.colorways`      | Links related products as color variants on the PDP                                      | Product list         |
| `custom.colorway_color` | The hex color for each colorway swatch                                                   | Single line text     |
| `custom.is_preorder`    | Changes the ATC button label to your pre-order text                                      | Boolean (true/false) |
| `custom.preorder_text`  | Text that replaces "Add to Cart" when pre-order is on (defaults to "Pre-Order")          | Single line text     |
| `custom.feed_bg_color`  | Per-product seed color for the Live Gradient OR solid color bg morph on the Product Feed | Color                |
| `custom.feed_bg_media`  | Per-product image or video that takes over the feed background on the active slide       | File reference       |
| `custom.sold_out_text`  | Replaces the words "Sold Out" on that product, e.g. "Coming Soon"                        | Single line text     |

## Not a metafield, but related

[**Variant Swatches**](/drift-shopify-theme/drift-studio/sections-and-features/variant-swatches.md) — Shopify's native swatch system for option values within a single product. DRIFT renders these automatically. Use this when one product has multiple colors. Use the Colorways metafield (above) when each color is its own product.

Detail pages for each:

* [**Custom Badge**](/drift-shopify-theme/drift-studio/metafields/badge.md) — override the default sale badge with custom text
* [**Size Chart**](/drift-shopify-theme/drift-studio/metafields/size-chart.md) — modal-based size guide on PDP and quick-add
* [**Colorways**](/drift-shopify-theme/drift-studio/metafields/colorways.md) — link separate products as color variants
* [**Pre-Order**](/drift-shopify-theme/drift-studio/metafields/preorder.md) — relabel the ATC button as Pre-Order
* [**Feed background color**](/drift-shopify-theme/drift-studio/metafields/feed-bg-color.md) — per-product gradient seed / solid color
* [**Feed background media**](/drift-shopify-theme/drift-studio/metafields/feed-bg-media.md) — per-product image or video background
* [**Sold Out Text**](/drift-shopify-theme/drift-studio/metafields/sold-out-text.md) — say "Coming Soon" instead of "Sold Out"

## How to set up a metafield in Shopify

You only do this once per metafield, then any product can use it.

1. Open Shopify admin → **Settings** → **Custom data**
2. Pick **Products**
3. Click **Add definition**
4. Fill in:
   * **Name** — human-friendly name (e.g., "Custom Badge")
   * **Namespace and key** — must match exactly what DRIFT expects (see each metafield page)
   * **Type** — must match (text, rich text, product list, etc.)
5. Save

Now go to any product. Scroll to the bottom of the product page in admin. You'll see a **Metafields** section where you can fill in values per product.

## Heads up on namespace and key

DRIFT looks for metafields under the `custom` namespace (Shopify's default for store-managed metafields). The keys must be exactly:

* `custom.badge`
* `custom.size_chart`
* `custom.colorways`
* `custom.colorway_color`
* `custom.is_preorder`
* `custom.preorder_text`
* `custom.feed_bg_color`
* `custom.feed_bg_media`

If you use a different namespace or misspell the key, the theme won't find the value and the feature won't activate. No error message — it just silently doesn't show.

## Bulk editing

If you have hundreds of products, edit metafields one at a time isn't realistic. Two options:

* **Shopify's bulk editor** — Products → select multiple → Bulk edit → add the metafield column
* **Matrixify or Excelify apps** — CSV import/export of metafields

Both work fine with DRIFT.
