Follow this tutorial to create a section with a customize option in Shopify.
- Log in to your Shopify admin panel and navigate to the Section folder.
Add a dynamic image in your section.
You can view all your schema type from here
Now add the following code in grid-box.liquid file:
{% schema %}
{
"name": "Grid Box",
"settings": [{
"type": "image_picker",
"id": "image",
"label": "This is image picker"
}]
}
{% endschema %}
Now update the Setting_data.json file with the following code:
"grid-box": {
"type": "grid-box",
"settings": {
"image": "shopify:\/\/shop_images\/pexels-sam-lion-5710223.jpg"
}
}
Now write your section name in content for an index of your home page section.
"content_for_index": [
"grid-box"
]
Top comments (0)