Add sidebar custom menu in customize theme shopify
1. config --> data_schema.jason file add following code:
Supose you wil add text in headerbar then you will write these code for make dynamic text of headerbar
{
"name": "Header",
"settings": [
{
"type": "header",
"content": "Top bar"
},
{
"type": "text",
"id": "header_message1",
"label": "Top bar message1",
"info": "Max 55 characters"
},
{
"type": "text",
"id": "header_message2",
"label": "Top bar message2",
"info": "Max 55 characters"
}
]
},
2. snippets --> header.liquid file add following code:
<div class="col-md-6 col-sm-12 col-xs-12">
<ul class="topm-social">
{% if settings.header_message1 != blank %}
<li>{{ settings.header_message1 }}</li>
{% endif %}
{% if settings.header_message2 != blank %}
<li>{{ settings.header_message2 }}</li>
{% endif %}
</ul>
</div>
Comments
Post a Comment