SectionAI is free + 20K tokens if you're a The4 customer, Free plan is available Install App  

Header background

How to use metaobject with theme sections?

Annie

Written by Annie

Last updated

1241 views

On this page


Demo

If you want to have a section that displays different content for each product/collection page, you use MetaObject to build the data structure and connect with the section of the theme.

In this article, we guide you on building an 'Accordion' on product page. You can do similar steps for other sections. Let's check this example:

1. Create MetaObject

  • Go to Content > MetaObject > Add definition > Fill in any name you want. Example: Accordion for FAQ

  • Click 'Add field' > Then you create some fields for data in the section.

Note: The type in each field must be matched with the field type in theme section.

111.gif

Example: if you use Accordion. You will create 2 fields:

  • Accordion label => Single text (One value)

  • Accordion content => Rich text

Click 'Save'. Please follow this video:

2. Add entry

Go to Content > MetaObject > 'Accordion for FAQ' > 'Add entry'

You fill in the data for each Accordion item you want. Follow this video:

3. Create Metafield definition

Go to Settings > Custom data > Products/Collections (If you are building the section on collection page) > Add definition

  • Name: Any name you want. Example: FAQ product

  • Content type: Metaobject

  • Reference: "Accordion for FAQ" at step 1

  • One entry or List of entries (if you want to have many accordion blocks for each product)

Please follow video below:

4. Select entry for Products/Collections

Go to Products > open product > scroll down to Metafields > Select entry. You can select one entry or many entries.

Follow this video:

5. Connect MetaObject in Theme customize

Go to Theme Customize > Product page > open section > 'Connect dynamic source' with MetaObject.

🎁 Exclusive Deals for The4 Customers

SectionAI

🤖 SectionAI – Build Sections with AI

Generate Shopify sections from text or wireframes.
The4 users get +20,000 bonus tokens when verifying their theme license.

  • ✅ No-code section builder
  • ✅ Works with your The4 theme
  • ✅ Build FAQs, banners, product grids & more
🚀 Try Free – Claim Tokens
EComposer

🎉 EComposer – Free 6-Month Plan

Build landing pages, sales funnels, and more with drag & drop.
The4 users get 6 months free (save $114).

  • ✅ 100+ templates ready to use
  • ✅ Build any Shopify page
  • ✅ No coding required
🔓 Get 6 Months Free

Enjoy a free 3-day trial. Then get your first month for $1. Try Now

We uses cookies to ensure you get the best experience on our website.