Shopify themes, liquid, logos, and UX
I would like to be able to change it like so:
"type": "select",
"id": "banner_type",
"label": "Header Type",
"default": "image_all_pages",
"options": [
{ "value": "video_homepage", "label": "Video Header on Home Page Only" },
{ "value": "video_all_pages", "label": "Video Header On All Pages" },
{ "value": "image_all_pages", "label": "Default Header On All Pages" }
settings in theme.liquid
{% assign selected_header = settings.header_type %}
{% if selected_header == 'video_homepage' %}
{% if template.name == 'index' %}
{% section 'header' %} <!-- Video header on homepage -->
{% else %}
{% section 'header2' %} <!-- Default or alternative header on other pages -->
{% endif %}
{% elsif selected_header == 'video_all_pages' %}
{% section 'header' %} <!-- Video header on all pages -->
{% elsif selected_header == 'image_all_pages' %}
{% section 'header2' %} <!-- Default or alternative header on all pages -->
{% endif %}
added to settings_schema.json
"name": "Header Type",
"settings": [
{
"type": "select",
"id": "header_type",
"label": "Header Type",
"options": [
{ "value": "video_homepage", "label": "Video Header on Home Page Only" },
{ "value": "video_all_pages", "label": "Video Header On All Pages" },
{ "value": "image_all_pages", "label": "Default Header On All Pages" }
],
"default": "image_all_pages"
}
]
}]
I created a header2.liquid that is just a copy of the old header.liquid. The video header only displays across the site. I would also like to be able to customize header2.liquid from the schema in header.liquid if possible, and add a separate logo for header2.liquid
Thank you Julius. I thought that's what I was doing! Can you tell me where my code is wrong?
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025