I have a custom sections/custom-icons.liquid file that isn’t appearing in the “add sections” option in the Shopify admin editor for the homepage. I’m looking for a solution to get it to appear as an option here so I can add it to the homepage as I need it.
Below is the entire code for the section/custom-icons.liquid including schema. What am I missing?
{% for i in (1..4) %}
{% assign image_num = "image_" | append: i %}
{% assign image = section.settings[image_num] %}
{% assign heading_id = "image_" | append: i | append: "_heading" %}
## {{ section.settings[heading_id] }}
{% assign text_body_id = "image_" | append: i | append: "_text_body" %}
{% assign text_body_italic_id = "image_" | append: i | append: "_text_body_italic" %}
{{ section.settings[text_body_id] | newline_to_br }}
{% endfor %}
{% if template == 'customer/account' %}
Delete this section
{% endif %}
{% schema %}
{
"name": "Custom Icons",
"class": "index-section",
"settings": [
{
"type": "header",
"content": "Slider Settings"
},
{
"type": "checkbox",
"id": "autoPlay",
"label": "Auto Play",
"default": true
},
{
"type": "checkbox",
"id": "wrapAround",
"label": "Wrap Around",
"default": false
},
{
"type": "checkbox",
"id": "pageDots",
"label": "Show Page Dots",
"default": false
},
{
"type": "header",
"content": "Image 1"
},
{
"type": "image_picker",
"id": "image_1",
"label": "Image",
"info": "Upload an image for Image 1"
},
{
"type": "text",
"id": "image_1_heading",
"label": "Heading",
"info": "Enter a heading for Image 1"
},
{
"type": "text",
"id": "image_1_text_body",
"label": "Text Body",
"info": "Enter a text body for Image 1"
},
{
"type": "checkbox",
"id": "image_1_text_body_italic",
"label": "Italic Text",
"default": false
},
{
"type": "header",
"content": "Image 2"
},
{
"type": "image_picker",
"id": "image_2",
"label": "Image",
"info": "Upload an image for Image 2"
},
{
"type": "text",
"id": "image_2_heading",
"label": "Heading",
"info": "Enter a heading for Image 2"
},
{
"type": "text",
"id": "image_2_text_body",
"label": "Text Body",
"info": "Enter a text body for Image 2"
},
{
"type": "checkbox",
"id": "image_2_text_body_italic",
"label": "Italic Text",
"default": false
},
{
"type": "header",
"content": "Image 3"
},
{
"type": "image_picker",
"id": "image_3",
"label": "Image",
"info": "Upload an image for Image 3"
},
{
"type": "text",
"id": "image_3_heading",
"label": "Heading",
"info": "Enter a heading for Image 3"
},
{
"type": "text",
"id": "image_3_text_body",
"label": "Text Body",
"info": "Enter a text body for Image 3"
},
{
"type": "checkbox",
"id": "image_3_text_body_italic",
"label": "Italic Text",
"default": false
},
{
"type": "header",
"content": "Image 4"
},
{
"type": "image_picker",
"id": "image_4",
"label": "Image",
"info": "Upload an image for Image 2"
},
{
"type": "text",
"id": "image_4_heading",
"label": "Heading",
"info": "Enter a heading for Image 2"
},
{
"type": "text",
"id": "image_4_text_body",
"label": "Text Body",
"info": "Enter a text body for Image 2"
},
{
"type": "checkbox",
"id": "image_4_text_body_italic",
"label": "Italic Text",
"default": false
}
]
}
{% endschema %}