Open /sections/footer.liquid
then add a new section block to the blocks
array, this code should give you a basic starting point:
{
"type": "html_content",
"name": "HTML Content",
"settings": [
{
"type": "html",
"id": "html_area",
"label": "Custom HTML",
"default": "<div><p>Some HTML content</p></div>"
}
]
}
Then to display the content, you need to add a new type check for the html_content
type in the {%- case block.type -%}
block, like so:
{%- case block.type -%}
{%- when 'newsletter' -%}
.
.
.
{%- when 'text' -%}
.
.
.
{%- when 'link_list' -%}
.
.
.
{%- when 'html_content' -%}
{{ block.settings.html_area }}
{%- endcase -%}
When you save the change and refresh your theme customizer, you should be able to see a new content type in the footer section.
For all theme section input types refer to this doc.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…