Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi guys, I'm new to liquid and I have a problem. What's wrong with my second block as it says that its incompatible. Anyone can explain or give some article links that's valuable and easy to understand? I'll appreciate all the help Thanks 🙂
My first block works fine, but the second one is not working.
Solved! Go to the solution
This is an accepted solution.
Hey @jake_lue,
You don't need to define multiple blocks array. Instead, you can use different block types inside one block array.
Please see the below example. You can also refer to this link for more information about section schema.
{% schema %}
{
"name": "Schema Demo",
"settings": [
{
"type": "text",
"id": "title",
"label": "Section title"
}
],
"blocks": [
{
"name": "First Block",
"type": "image",
"settings": [
{
"type": "image_picker",
"id": "image",
"label": "Image"
}
]
},
{
"name": "Second Block",
"type": "text",
"settings": [
{
"type": "text",
"id": "text",
"label": "Text"
}
]
}
]
}
{% endschema %}
This is an accepted solution.
Hey @jake_lue,
You don't need to define multiple blocks array. Instead, you can use different block types inside one block array.
Please see the below example. You can also refer to this link for more information about section schema.
{% schema %}
{
"name": "Schema Demo",
"settings": [
{
"type": "text",
"id": "title",
"label": "Section title"
}
],
"blocks": [
{
"name": "First Block",
"type": "image",
"settings": [
{
"type": "image_picker",
"id": "image",
"label": "Image"
}
]
},
{
"name": "Second Block",
"type": "text",
"settings": [
{
"type": "text",
"id": "text",
"label": "Text"
}
]
}
]
}
{% endschema %}
@jake_lue It's my pleasure. Happy Coding!!
Do you have something like a discord group for developers that involves liquid? 🙂
Once you've created the block in your template [products.json], You need to go into the sections and find [main-product.liquid] file, scroll all the way down to the schema and define it and its settings there too. Hope this helps
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025