# Metafields and metaobjects

> The product and collection metafields Tally reads, how to create them, and how to show any metaobject on your store with the Metaobject entries section.

Tally theme documentation · HTML version: https://themelab.page/tally/docs/metafields/

**Metafields** add your own fields to products and collections – a subtitle, highlights, specifications. **Metaobjects** are your own content types – team members, ingredients, stockists – with as many entries as you like. Both are set up in **Settings › Custom data**, with no code.

## Create a metafield

1. Go to **Settings › Custom data › Products** (or **Collections**) and select **Add definition**.
2. Enter a **Name**. Under it, select the namespace and key and change them to exactly what the table below says, for example `custom.subtitle`.
3. Pick the **Type** from the table (for example *Single line text*, or *List of single line texts* for `custom.highlights`) and save.
4. Open a product. The new field is in the **Metafields** card at the bottom of the page; fill it in and save.

> **Tip:** Connect metafields to blocks
>
> Text settings with a small database icon next to them in the theme editor (**Connect dynamic source**) can show a metafield instead of fixed text. Tally uses this in the Badges, Collapsible tab, Side panel, Highlights and Specifications blocks for product-specific content.

## Metafields Tally reads

All are product metafields in the `custom` namespace unless noted.

| Metafield | Type | Used by |
| --- | --- | --- |
| `custom.subtitle` | Single line text | The line under the title on product cards, with **Show product type** on in **Theme settings › Product cards**. |
| `custom.badge` | Single line text | Your own tag on the product card photo, such as *Bestseller*. A product tag like `badge:Bestseller` works too. |
| `custom.highlights` | List of single line texts (or multi-line text) | The [Highlights](https://themelab.page/tally/docs/product-page.md#highlights) block when it has no text of its own. |
| `custom.specs` | Multi-line text, one `Label: value` per line | The [Specifications](https://themelab.page/tally/docs/product-page.md#specifications) block and the [Compare](https://themelab.page/tally/docs/theme-settings.md#compare) table. Any other key works if you enter it in the settings. |
| `custom.siblings` | List of products | The [Other colors](https://themelab.page/tally/docs/product-page.md#siblings) block. |
| `custom.sibling_label` | Single line text | The color or style name in Other colors, such as *Sage*. |
| `custom.sibling_group` | Single line text | The heading of Other colors, such as *Color* or *Style*. |
| `custom.sibling_color` | Color | The swatch color in Other colors. |
| `custom.banner_image` (collection) | File | A banner photo for the collection page, instead of the collection image. |
| `reviews.rating`, `reviews.rating_count` | Rating, Integer | Star ratings. Filled by your reviews app – do not create them yourself. |
| Color (category metafield) | Color | Color swatches. Filled from the product's category in Shopify. See [Color swatches](https://themelab.page/tally/docs/product-page.md#color-swatches). |

## Metaobjects

The **Metaobject entries** section shows the entries of any metaobject as a grid or an accordion. For example, a team page:

1. Go to **Settings › Custom data › Metaobjects** and select **Add definition**. Name it *Team member*; its type becomes `team_member`.
2. Add fields: *Name* (single line text, key `name`), *Role* (single line text, key `role`), *Bio* (multi-line text, key `bio`) and *Photo* (file, key `photo`).
3. Turn on **Storefronts** access for the definition and save. Without it, the theme cannot read the entries.
4. Add entries in **Content › Metaobjects**.
5. In the theme editor, add the **Metaobject entries** section. Enter `team_member` in **Definition type**, and the field keys: `name` in **Title field**, `role` in **Subtitle field**, `bio` in **Text field** and `photo` in **Image field**.

**Link field** can be a URL, product, collection or page field; it links each entry. With the *Accordion* layout, the title field becomes the question and the text field the answer – an easy way to keep FAQs in one place and show them on several pages.

The section stays hidden while the definition has no entries.

See all [Metaobject entries settings](https://themelab.page/tally/docs/sections/metaobject-entries.md).
