Hi,
I wanted to see if anyone has already added a homepage banner image option specifically for mobile. This way I can upload an image for desktop and a different image for mobile.
Thanks!
Hi,
I wanted to see if anyone has already added a homepage banner image option specifically for mobile. This way I can upload an image for desktop and a different image for mobile.
Thanks!
yes its already allow this please change the image banner section
if no option you have to try this way
I donât understand what you mean by change the image banner section. I am using the âImage bannerâ section.
Also, the link you provided doesnât work.
can you please sent your store url
yes its work all theme
Hi,
Iâm using the Dawn 2.0 theme but the section doesnât seem to be working. Please help.
Thank you.
Hello.
Thanks for the reply. I actually followed the steps in the website yesterday. The problem is the section appears on my Customise menu but the pictures donât appear on the homepage. It only shows a white bar.
yes please share store url with code added
My url is www.letsglowshop.com
Is there a way to add buttons to the YX Mobile and Desktop banners?
Hello Katan,
Site password is: siento
Section > YX-desktop-banner.liquid
{% for block in section.blocks limit: 1 %}> > {% endfor %}>
{% schema %}> {> ânameâ: âYX Desktop Bannerâ,> âclassâ: âyx-desktop-banner-sectionâ,> âmax_blocksâ: 1,> âblocksâ: [> {> âtypeâ: âimage_pickerâ,> ânameâ: âDesktop Banner Imageâ,> âsettingsâ: [> {> âlabelâ: âDesktop Banner Imageâ,> âidâ: âyx_image_pickerâ,> âtypeâ: âimage_pickerâ> }> ]> }> ],> âpresetsâ: [> {> ânameâ: âYX Desktop Bannerâ,> âcategoryâ: âHomeâ,> âblocksâ:[{âtypeâ : âimage_pickerâ}]> }> ]> }> {% endschema %}> {% stylesheet %}> {% endstylesheet %}> {% javascript %}> {% endjavascript %}
Section > YX-mobile-banner.liquid
{% for block in section.blocks limit: 1 %}> > {% endfor %}>
{% schema %}> {> ânameâ: âYX Mobile Bannerâ,> âclassâ: âyx-mobile-banner-sectionâ,> âmax_blocksâ: 1,> âblocksâ: [> {> âtypeâ: âimage_pickerâ,> ânameâ: âMobile Banner Imageâ,> âsettingsâ: [> {> âlabelâ: âMobile Banner Imageâ,> âidâ: âyx_image_pickerâ,> âtypeâ: âimage_pickerâ> }> ]> }> ],> âpresetsâ: [> {> ânameâ: âYX Mobile Bannerâ,> âcategoryâ: âHomeâ,> âblocksâ:[{âtypeâ : âimage_pickerâ}]> }> ]> }> {% endschema %}> {% stylesheet %}> {% endstylesheet %}> {% javascript %}> {% endjavascript %}
try this code first
{% for block in section.blocks limit: 1 %}
Shop now
{% endfor %}
{% schema %}
{
"name": "YX Desktop Banner",
"class": "yx-desktop-banner-section",
"max_blocks": 1,
"blocks": [
{
"type": "image_picker",
"name": "Desktop Banner Image",
"settings": [
{
"label": "Desktop Banner Image",
"id": "yx_image_picker",
"type": "image_picker"
}
]
}
],
"presets": [
{
"name": "YX Desktop Banner",
"category": "Home",
"blocks":[{"type" : "image_picker"}]
}
]
}
{% endschema %}
{% stylesheet %}
{% endstylesheet %}
{% javascript %}
{% endjavascript %}
I just tried the code. It doesnât seem to be working. ![]()
can you please sent your theme zip code so i will check and update
Sure this is my theme.liquid
{%- if settings.favicon != blank -%}> > {%- endif -%}> > {%- unless settings.type_header_font.system? and settings.type_body_font.system? -%}> > {%- endunless -%}> > > > {% if page_description %}> > {% endif %}> > {% render âmeta-tagsâ %}> > > {{ content_for_header }}> > {%- liquid> assign body_font_bold = settings.type_body_font | font_modify: âweightâ, âboldâ> assign body_font_italic = settings.type_body_font | font_modify: âstyleâ, âitalicâ> assign body_font_bold_italic = body_font_bold | font_modify: âstyleâ, âitalicâ> %}> > {% style %}> {{ settings.type_body_font | font_face: font_display: âswapâ }}> {{ body_font_bold | font_face: font_display: âswapâ }}> {{ body_font_italic | font_face: font_display: âswapâ }}> {{ body_font_bold_italic | font_face: font_display: âswapâ }}> {{ settings.type_header_font | font_face: font_display: âswapâ }}> > :root {> --font-body-family: {{ settings.type_body_font.family }}, {{ settings.type_body_font.fallback_families }};> --font-body-style: {{ settings.type_body_font.style }};> --font-body-weight: {{ settings.type_body_font.weight }};> > --font-heading-family: {{ settings.type_header_font.family }}, {{ settings.type_header_font.fallback_families }};> --font-heading-style: {{ settings.type_header_font.style }};> --font-heading-weight: {{ settings.type_header_font.weight }};> > --color-base-text: {{ settings.colors_text.red }}, {{ settings.colors_text.green }}, {{ settings.colors_text.blue }};> --color-base-background-1: {{ settings.colors_background_1.red }}, {{ settings.colors_background_1.green }}, {{ settings.colors_background_1.blue }};> --color-base-background-2: {{ settings.colors_background_2.red }}, {{ settings.colors_background_2.green }}, {{ settings.colors_background_2.blue }};> --color-base-solid-button-labels: {{ settings.colors_solid_button_labels.red }}, {{ settings.colors_solid_button_labels.green }}, {{ settings.colors_solid_button_labels.blue }};> --color-base-outline-button-labels: {{ settings.colors_outline_button_labels.red }}, {{ settings.colors_outline_button_labels.green }}, {{ settings.colors_outline_button_labels.blue }};> --color-base-accent-1: {{ settings.colors_accent_1.red }}, {{ settings.colors_accent_1.green }}, {{ settings.colors_accent_1.blue }};> --color-base-accent-2: {{ settings.colors_accent_2.red }}, {{ settings.colors_accent_2.green }}, {{ settings.colors_accent_2.blue }};> --payment-terms-background-color: {{ settings.colors_background_1 }};> > --gradient-base-background-1: {% if settings.gradient_background_1 != blank %}{{ settings.gradient_background_1 }}{% else %}{{ settings.colors_background_1 }}{% endif %};> --gradient-base-background-2: {% if settings.gradient_background_2 != blank %}{{ settings.gradient_background_2 }}{% else %}{{ settings.colors_background_2 }}{% endif %};> --gradient-base-accent-1: {% if settings.gradient_accent_1 != blank %}{{ settings.gradient_accent_1 }}{% else %}{{ settings.colors_accent_1 }}{% endif %};> --gradient-base-accent-2: {% if settings.gradient_accent_2 != blank %}{{ settings.gradient_accent_2 }}{% else %}{{ settings.colors_accent_2 }}{% endif %};> > --page-width: {{ settings.page_width | divided_by: 10 }}rem;> --page-width-margin: {% if settings.page_width == â1600â %}2{% else %}0{% endif %}rem;> }> > *,> *::before,> *::after {> box-sizing: inherit;> }> > html {> box-sizing: border-box;> font-size: 62.5%;> height: 100%;> }> > body {> display: grid;> grid-template-rows: auto auto 1fr auto;> grid-template-columns: 100%;> min-height: 100%;> margin: 0;> font-size: 1.5rem;> letter-spacing: 0.06rem;> line-height: 1.8;> font-family: var(âfont-body-family);> font-style: var(âfont-body-style);> font-weight: var(âfont-body-weight);> }> > @media screen and (min-width: 750px) {> body {> font-size: 1.6rem;> }> }> {% endstyle %}> > {{ âbase.cssâ | asset_url | stylesheet_tag }}> > {%- unless settings.type_body_font.system? -%}> > {%- endunless -%}> {%- unless settings.type_header_font.system? -%}> > {%- endunless -%}> > {%- if settings.predictive_search_enabled -%}> > {%- endif -%}> > > {% render âjudgeme_coreâ %}> > > > > {{ âaccessibility.skip_to_textâ | t }}> > > {% section âannouncement-barâ %}> {% section âheaderâ %}> > > {% section âfooterâ %}> > > - {{ âaccessibility.refresh_pageâ | t }}>
{%- if settings.predictive_search_enabled -%}> > {%- endif -%}> >
Sorry for the mix up. Here you go ![]()
Thank you!
Any solution?