I’m adding a custom section in the /section folder “trust-badges.liquid”. When I typed the code in HTML and CSS, everything was perfect and working fine. The issue started when I converted it into ‘.liquid’ file by adding {% for %} loop to render each block (i.e badge). Take a look at the code. I have also tagged the images as well. Feel free to ask anything you need to inspect further. Thanks in advance..!
When the code was first written in HTML & CSS:
When added to shopify
{% schema %}
{
"name": "Trust Badges",
"tag": "section",
"class": "trust-badges",
"presets": [
{
"name": "Custom Trust Badges"
}
],
"blocks": [
{
"type": "trust-badge",
"name": "Trust Badge",
"settings": [
{
"type": "image_picker",
"id": "badge-image",
"label": "Badge Image"
},
{
"type": "text",
"id": "badge-title",
"label": "Badge Title",
"default": "Title"
},
{
"type": "textarea",
"id": "badge-context",
"label": "Badge Context"
}
]
}
],
"settings": []
}
{% endschema %}