Hi @Antonynex,
Step 1 :
Go to Online Store → Theme → Edit code and create a file (File Name: custom-hero-banner.liquid).
Step 2 :
Paste this code .
{% schema %}
{
"name": "Custom Hero Banner",
"settings": [
{
"type": "image_picker",
"id": "desktop_image",
"label": "Desktop Banner Image"
},
{
"type": "image_picker",
"id": "mobile_image",
"label": "Mobile Banner Image"
},
{
"type": "header",
"content": "Image Size Adjustment"
},
{
"type": "range",
"id": "desktop_height",
"min": 300,
"max": 800,
"step": 10,
"unit": "px",
"label": "Desktop Banner Height",
"default": 600
},
{
"type": "range",
"id": "mobile_height",
"min": 200,
"max": 600,
"step": 10,
"unit": "px",
"label": "Mobile Banner Height",
"default": 400
},
{
"type": "select",
"id": "image_fit",
"label": "Image Fit Type",
"options": [
{ "value": "cover", "label": "Cover (Fill Space)" },
{ "value": "contain", "label": "Contain (Show Full Image)" }
],
"default": "cover"
},
{
"type": "header",
"content": "Button 1 Settings"
},
{
"type": "text",
"id": "btn_1_text",
"label": "Button 1 Text",
"default": "Shop Bestsellers"
},
{
"type": "url",
"id": "btn_1_link",
"label": "Button 1 Link"
},
{
"type": "header",
"content": "Button 2 Settings"
},
{
"type": "text",
"id": "btn_2_text",
"label": "Button 2 Text",
"default": "Bekijk Nieuwe Collectie"
},
{
"type": "url",
"id": "btn_2_link",
"label": "Button 2 Link"
},
{
"type": "header",
"content": "Button Colors"
},
{
"type": "color",
"id": "btn_bg_color",
"label": "Button Background Color",
"default": "#ebe3d5"
},
{
"type": "color",
"id": "btn_text_color",
"label": "Button Text Color",
"default": "#5d4037"
},
{
"type": "color",
"id": "btn_hover_bg",
"label": "Button Hover Background",
"default": "#5d4037"
},
{
"type": "color",
"id": "btn_hover_text",
"label": "Button Hover Text",
"default": "#ffffff"
}
],
"presets": [
{
"name": "Custom Hero Banner"
}
]
}
{% endschema %}
<section class="custom-hero">
<div class="banner-container">
{% if section.settings.desktop_image != blank %}
<div class="banner-wrapper desktop-only">
<img src="{{ section.settings.desktop_image | img_url: 'master' }}" alt="Desktop Banner">
</div>
{% endif %}
{% if section.settings.mobile_image != blank %}
<div class="banner-wrapper mobile-only">
<img src="{{ section.settings.mobile_image | img_url: 'master' }}" alt="Mobile Banner">
</div>
{% else %}
<div class="banner-wrapper mobile-only">
<img src="{{ section.settings.desktop_image | img_url: 'master' }}" alt="Mobile Banner">
</div>
{% endif %}
<div class="banner-buttons">
{% if section.settings.btn_1_text != blank %}
<a href="{{ section.settings.btn_1_link }}" class="custom-btn">{{ section.settings.btn_1_text }}</a>
{% endif %}
{% if section.settings.btn_2_text != blank %}
<a href="{{ section.settings.btn_2_link }}" class="custom-btn">{{ section.settings.btn_2_text }}</a>
{% endif %}
</div>
</div>
</section>
<style>
.custom-hero { position: relative; width: 100%; overflow: hidden; }
.banner-container { position: relative; width: 100%; }
.banner-wrapper {
width: 100%;
overflow: hidden;
}
/* Desktop Height Adjustment */
.banner-wrapper.desktop-only {
height: {{ section.settings.desktop_height }}px;
}
.banner-wrapper img {
width: 100%;
height: 100%;
object-fit: {{ section.settings.image_fit }};
display: block;
}
.banner-buttons {
position: absolute;
bottom: 12%;
display: flex;
gap: 20px;
justify-content: center;
width: 100%;
z-index: 10;
}
.custom-btn {
background-color: {{ section.settings.btn_bg_color }};
color: {{ section.settings.btn_text_color }};
padding: 14px 35px;
text-decoration: none;
font-weight: 600;
border-radius: 4px;
transition: all 0.3s ease;
font-size: 16px;
min-width: 200px;
text-align: center;
}
.custom-btn:hover {
background-color: {{ section.settings.btn_hover_bg }};
color: {{ section.settings.btn_hover_text }};
}
.desktop-only { display: block; }
.mobile-only { display: none; }
@media (max-width: 768px) {
.desktop-only { display: none; }
.mobile-only {
display: block;
height: {{ section.settings.mobile_height }}px;
}
.banner-buttons { flex-direction: column; bottom: 8%; align-items: center; gap: 12px; }
.custom-btn { width: 85%; min-width: unset; }
}
</style>
Step 3 :
Go to Edit them and add new custom hero banner section .
Hope this helps! If yes then Please don’t forget hit Like and Mark it as solution!