Before metaobjects, Shopify stores had two options for structured custom content: squeeze it into metafields on products/pages (messy), or use a third-party app like Shogun or Accentuate (expensive, app dependency). Metaobjects changed this — they're Shopify's native custom content types, available without any app.
Metafields: extra data on existing resources
Metafields attach additional data to existing Shopify resources: products, variants, collections, customers, orders, pages, and more. They're typed (text, number, date, URL, file, JSON, reference) and defined by a namespace and key.
- →Product metafields: care instructions, materials, country of origin, technical specs
- →Variant metafields: size guide URL, fit type, color swatch reference
- →Collection metafields: banner image, featured brand, SEO content blocks
- →Order metafields: delivery date preference, gift message, B2B purchase order number
- →Customer metafields: trade account status, company name, VAT number
Defining and accessing metafields
# Create a metafield definition
mutation {
metafieldDefinitionCreate(definition: {
namespace: "custom"
key: "care_instructions"
name: "Care Instructions"
type: "multi_line_text_field"
ownerType: PRODUCT
visibleToStorefrontApi: true
}) {
createdDefinition { id name }
userErrors { field message }
}
}
# Access in Liquid
{{ product.metafields.custom.care_instructions.value }}Metaobjects: custom data types
Metaobjects are custom structured data types — like a CMS content model. You define a type (e.g. 'Team Member', 'Testimonial', 'FAQ') with fields, then create entries of that type. Entries can be referenced from product metafields, pages, and displayed in your theme.
- →Use case: a 'Testimonial' metaobject with fields for quote, author name, author role, and avatar
- →Use case: a 'Size Guide' metaobject with fields for size chart data, brand, and product category
- →Use case: a 'Team Member' metaobject with name, role, bio, and photo fields
- →Use case: 'FAQ' metaobjects for structured questions and answers, referenced from product pages
# Create a metaobject definition
mutation {
metaobjectDefinitionCreate(definition: {
type: "testimonial"
name: "Testimonial"
fieldDefinitions: [
{ key: "quote", name: "Quote", type: "multi_line_text_field", required: true }
{ key: "author_name", name: "Author Name", type: "single_line_text_field", required: true }
{ key: "author_role", name: "Author Role", type: "single_line_text_field" }
{ key: "rating", name: "Rating", type: "rating" }
]
}) {
metaobjectDefinition { id type }
userErrors { field message }
}
}Metafields vs Metaobjects: the decision
- →Use metafields when: adding extra data to an existing resource (product, order, customer)
- →Use metaobjects when: creating a new content type that doesn't fit an existing resource
- →Use metaobject references from metafields when: linking reusable structured content to a resource (e.g. a product references a 'Size Guide' metaobject)
Exposing metaobjects on the storefront
Metaobjects can be queried via the Storefront API and accessed in Liquid via {% for entry in shop.metaobjects.testimonial.values %}. In the theme editor, metaobject reference fields can be exposed as picker inputs — letting your merchandising team select which testimonials appear on each product page.
Metaobjects marked as 'Storefronts API access' are publicly readable without authentication. Don't store sensitive data in metaobjects that have storefront access enabled.
Replacing content apps with metaobjects
Most stores using page builders or content apps (Shogun, PageFly) for structured product content can replace these with metaobjects and custom sections. The result is faster (no app JavaScript), cheaper (no monthly fee), and more maintainable. The only caveat: you need a developer to build the sections — the no-code drag-and-drop is gone.
Building something like this on Shopify?
I build exactly what I write about. If you need help implementing this, get in touch — I respond within 24 hours.
Get new Shopify guides by email
Practical, technical articles on Shopify development — no fluff, no sales emails.