Shopify Metaobjects Tutorial: Build Size Guides You Can Reuse

By Milan Dhameliya · · 8 min read

Create reusable Shopify size guides with metaobjects, connect each product to the right entry, and preserve older fit information when a new version launches.

To use Shopify metaobjects for a reusable size guide, create a guide definition, add an entry, and connect that entry to products through a metaobject-reference metafield. Then connect the product reference to your theme so each product displays its assigned guide, while products sharing an entry receive the same content updates.

This Shopify metaobjects tutorial builds that workflow for a clothing store. The important part comes after setup: deciding when to edit a shared guide and when to create a separate version. If a new production run changes the fit, updating the original entry could give shoppers buying older stock the wrong measurements.

Decide what should share a guide

Imagine two shirts that use the same approved sizing information and a third shirt with a different cut. This is an illustrative setup, not a client case study. We will connect the first two products to one guide, the third to another, and leave an accessory without a guide.

A metaobject holds a group of related fields. A product metafield holds the reference that selects the right entry. Shopify's metaobject overview distinguishes the definition, which specifies the fields, from entries, which contain their values. For our example, “Size guide” is the definition; “Classic shirt — original fit” is an entry.

Before building anything, write a small assignment list with product names, intended guide names, and the person who approved the measurements. Group products by the information buyers should receive. A shared brand or collection does not, by itself, mean the products share a fit.

Skip this approach if you only need one simple size-chart page and your theme already has a suitable pop-up. Shopify documents a page-reference size-chart workflow for that case. Use metaobjects when you need reusable structured fields, several distinct guides, or a clearer editing process. Neither approach verifies your measurements for you.

Create a definition staff can recognize

Go to Content > Metaobjects > Add definition. Name it Size guide and use size_guide as the type identifier. Shopify's definition instructions explain adding fields, setting their types, and choosing storefront access.

For this tutorial, create three fields. The keys below are our proposed schema; check the generated keys before saving because the Liquid example uses them exactly.

Make all three required. Keep Storefronts access enabled. You do not need to enable standalone web pages merely to show a guide inside a product page.

I recommend separating the entry label from the heading. Staff can select “Classic shirt — original fit” while customers see “Size and fit.” Treat the label as public-capable catalog content, however; this is not a place for confidential supplier notes.

The rich-text field is deliberately simple. Use labeled lists for a short guide. If your catalog needs a large measurement table, unit switching, or variant-specific calculations, define that requirement before building the renderer. This example does not implement those features.

Add entries, then assign products

Open Content > Metaobjects > Size guide > Add entry. Create “Classic shirt — original fit” and fill the heading and approved measurement content. Create a second entry for the different cut. Shopify's entry documentation covers creating and editing these records.

In each guide, state whether the numbers describe the garment or the wearer's body, name the units, and explain how to take the measurement. Ask the person responsible for product specifications to approve the content. Do not use generated measurements or infer a size conversion from a similar garment.

Next, go to Settings > Metafields and metaobjects > Products > Add definition. Name the product metafield Size guide, use custom.size_guide for its namespace and key, and choose Metaobject as its type. Select your Size guide definition and One value. Enable Storefronts access and save.

These steps follow Shopify's reference setup. A single reference is appropriate because this tutorial assigns one complete guide to each product. A list would require a different display and a decision about how customers choose among guides.

Under Products, open the first shirt, find its Size guide metafield, choose the original-fit entry, and save. Repeat for the second shirt. Assign the different-cut entry to the third shirt. Leave the accessory's field empty. You now have the four products needed to test whether the display follows the product rather than a fixed theme setting.

Connect the product reference to the theme

Work on a duplicate theme for the display changes. In Online Store > Themes, open the theme's actions menu and choose Duplicate, following Shopify's backup instructions. Our Shopify theme editor guide explains product previews and template selection.

Open the duplicate's editor, select the relevant product template, and preview your first shirt. If the theme provides compatible blocks, use the dynamic-source control to select the product's Size guide reference and its fields. Connect Heading to a suitable heading setting and Measurements and fit to a compatible rich-text setting.

The available controls depend on the theme. Shopify's connection documentation requires compatible field types and explains selecting references from the product template. Do not select the original-fit entry directly from the store's metaobjects if the intention is to follow each product's assignment.

Preview the different-cut shirt immediately. If it still shows the original-fit guide, inspect the connection before adding more entries. This is why testing a second guide matters: two products assigned to the same entry cannot expose an accidentally fixed connection.

A small Liquid renderer when the theme needs one

If the theme lacks suitable controls, a developer can place the following in the product template's rendering context, such as a supported Custom liquid block. It assumes the exact single-reference metafield and field keys above. It is a minimal display example, not a complete size-chart app.

{% assign size_guide = product.metafields.custom.size_guide.value %}
{% if size_guide != blank and size_guide.measurements_and_fit != blank %}
  <section class="product-size-guide">
    {% if size_guide.heading.value != blank %}
      <h2>{{ size_guide.heading.value | escape }}</h2>
    {% endif %}
    {{ size_guide.measurements_and_fit | metafield_tag }}
  </section>
{% endif %}

Shopify documents metafield access and metaobject field access separately. The reference's value selects the entry; the entry's field keys select its content. Pass the rich-text field itself to metafield_tag for HTML output. Do not append .value to that filter's input.

The conditional omits the entire section when the reference or content is unavailable. Have the developer check heading hierarchy and spacing in your theme. Our Liquid customization guide provides background if your team will maintain the renderer.

Keep an older fit correct when a new fit launches

Shopify states that editing a published entry updates it wherever it is used. Metaobject data also lives outside the theme, as explained in its storefront overview. My operational rule follows from those two facts: a theme preview is not a separate copy of your catalog content.

Duplicating the theme protects your layout experiment; it does not isolate edits to a size-guide entry already used by the live theme. Test with new entries and deliberately selected products. Do not change a live shared entry just to see whether the preview refreshes.

Use these two different update procedures:

For example, a new “Classic shirt — revised fit” entry should not replace the original merely because both shirts have the same marketing name. Ask fulfillment which stock customers will actually receive. If old and new fits coexist inside one product's variants, this product-level example is insufficient: scope variant-aware selection and test changes when shoppers switch variants.

Record the old and new entry assignment before changing it. A display rollback can restore a previous theme; a content rollback needs the previous content or product reference. Keep both records when a release changes both layers.

Approve the guide using four product checks

Before publishing the theme change, review the first two shirts, the different-cut shirt, and the accessory. I would ask the merchant responsible for sizing to perform the checks, rather than approving from the developer's screenshot alone.

Review these on a phone as well as desktop. Ask someone unfamiliar with the garment to explain what they would measure and which size they would choose. If the wording leaves them guessing whether a width is flat or a circumference, fix the content before debating presentation.

If a guide disappears, check the product's reference, exact field keys, storefront access, and entry status. When active-draft support is enabled, Shopify's Liquid reference says draft entries return no object. Do not set a live shared entry to Draft as a preview technique. Keep test content separate.

Finish by naming the person who owns measurements and the person who maintains the theme connection. A reusable guide is useful only when staff can select the right entry and understand the consequences of editing it. If you need a table, variant-aware guides, or a migration from pasted descriptions, our Shopify development services can help scope and implement that workflow.