How to Create a Metaobject in Shopify: A Step-by-Step Guide

Written by
Priyanka
Front End Developer
Muskan Saini
Front End Developer
Table of contents
Build with Radial Code
What is a Metaobject?
A metaobject is a custom data structure that lets you bundle multiple fields together as one reusable unit. Compared to standard metafields, metaobjects are far more flexible — you can combine different data types (text, images, URLs, and more) into a single, organized entry.
Key benefits:
- Customizability: Define exactly the fields your content needs.
- Reusability: Build it once, use it across multiple products
- Dynamic content: Create richer, more engaging product pages
- Better SEO: Well-organized content improves your store's searchability
Step-by-Step: Creating a Metaobject
- Go to the Right Section
- Define Your Fields
- Name: required, to identify the field
- Description: optional, for extra context
- Type: the kind of data (text, file, URL, etc.)
- Validation rules: e.g., character limits or preset values
- Save It
Log in to your Shopify admin and navigate to Content Metaobjects, Settings or Custom data, then click Add definition to create a new metaobject.
Fields are the building blocks of your metaobject. For each one, specify:
For example, a "Product Highlights" metaobject might include fields like Image, Heading, Caption, and Description.
Click Save. Your metaobject definition is now ready, and you can start adding entries.
How to Connect a Metaobject to Products
- Create Entries
- Go to Content in your admin
- Open the metaobject definition you created
- Click Add entry and fill in the fields
- Create a Metafield Definition That References the Metaobject
- Go to Settings > Custom data
- Under Metafields, select Products
- Click Add definition
- Under Select type, choose Metaobject, then select the definition you created
- Assign Entries to Products
- Open the product you want to connect
- In the Product metafields section, select the entry (or entries) you want to display
- Save Your Changes
Don't forget to save once everything's connected
How to Display Metaobjects on Your Storefront
Creating and connecting a metaobject isn't the end — you also need to actually display it on your store's theme. Here's how:
- Using Liquid Code (For Developers)
- Replace custom.highlights with your actual metafield namespace and key
- If the metafield references a single metaobject entry, drop the for loop and just reference .value directly
- Add this code inside the relevant section/snippet file (e.g., product-highlights.liquid) via Edit code in your theme
- Preview and Test
If your theme doesn't have a ready-made block, or you want more control over the layout, you can pull metaobject data directly using Liquid:
{% if product.metafields.custom.highlights %}
{% for entry in product.metafields.custom.highlights.value %}
<div class="highlight-block">
<img src="{{ entry.image | image_url }}" alt="{{ entry.heading }}">
<h3>{{ entry.heading }}</h3>
<p>{{ entry.caption }}</p>
</div>
{% endfor %}
{% endif %}
A few things to note:
After adding the block or code, preview your product page (or the relevant page) to make sure the entries display correctly — check images, text, and formatting across desktop and mobile.
Need expert guidance? Connect with the Radial Code team.
Best Practices
- Keep names descriptive but short for easy navigation
- Take advantage of reusability — build once, use across many products
- Review and refresh content regularly, especially for seasonal changes
- Use validation rules to keep data consistent
Real-World Applications
- Dynamic product highlights: showcase multiple features with images and text
- Ambassador program pages: Create consistent, branded pages for each ambassador
- Size charts: organized measurement and fit details for customers