Solved

Can’t seem to change image banner on general store

VitaVibe
Tourist
9 0 1

Hi, 

 

I have tried changing my desktop image banner but can’t seem to! It’s a pre built store so it’s keep asking me to change the custom liquid. 

I am attaching a picture of what is showing every time I try changing my picture.

 

Any help or advice will be appreciated 😊

 

Thanks 

VitaVibe 

A7788CB7-3DCD-4DC5-96A4-C720EDF173A4.jpeg

Accepted Solution (1)

EBOOST
Shopify Partner
817 225 252

This is an accepted solution.

Hi @VitaVibe,

Maybe I suggest you add a new section.

1. Go to Store Online-> theme -> edit code

EBOOST_1-1672356985580.png

2. Add a new section image-banner.liquid

EBOOST_0-1712564275378.png

 

3. Copy  code below to file -> save

 

{%  if section.settings.image != blank %}
  {%  assign mainImg = section.settings.image | img_url: 'master' %}
  {%  assign imgMobile = section.settings.image_2 | img_url: 'master' %}
<div class="img-banner">
  {%  if section.settings.url != blank %}
    <a href="{{ section.settings.url }}">
  {%  endif %}
  <picture>
    <source media="(min-width:750px)" srcset="{{ section.settings.image | img_url: 'master' }}">
    <source media="(max-width:749px)" srcset="{{imgMobile | defaul: mainImg }}">
    <img src="{{ section.settings.image | img_url: 'master' }}" alt="{{ section.settings.image.alt }}">
  </picture
    {%  if section.settings.url != blank %}
      </a>
  {%  endif %}
</div>
  <style>
    .img-banner img,
    .img-banner picture {
      width: 100%;
    }
  </style>
{%  endif %}
{% schema %}
{
  "name": "Image banner",
  "tag": "section",
  "class": "section",
  "disabled_on": {
    "groups": ["header", "footer"]
  },
  "settings": [
    {
      "type": "image_picker",
      "id": "image",
      "label": "Desktop Image"
    },
    {
      "type": "image_picker",
      "id": "image_2",
      "label": "Mobile Image"
    },
     {
          "type":"url",
          "id":"url",
          "label":"Link To",
          "default":"/collections/all"
        }
    
  ],
  "presets": [
    {
      "name": "Image banner",
      "blocks": [
       
      ]
    }
  ]
}
{% endschema %}

 

4. Go Customize -> click eye icon to hide custom liquid -> add Image banner section

EBOOST_0-1712564402482.png

 

Hope can help


If you find my reply helpful, please hit Like and Mark as Solution


https://www.eboosttech.net


EBOOST

View solution in original post

Replies 2 (2)

EBOOST
Shopify Partner
817 225 252

This is an accepted solution.

Hi @VitaVibe,

Maybe I suggest you add a new section.

1. Go to Store Online-> theme -> edit code

EBOOST_1-1672356985580.png

2. Add a new section image-banner.liquid

EBOOST_0-1712564275378.png

 

3. Copy  code below to file -> save

 

{%  if section.settings.image != blank %}
  {%  assign mainImg = section.settings.image | img_url: 'master' %}
  {%  assign imgMobile = section.settings.image_2 | img_url: 'master' %}
<div class="img-banner">
  {%  if section.settings.url != blank %}
    <a href="{{ section.settings.url }}">
  {%  endif %}
  <picture>
    <source media="(min-width:750px)" srcset="{{ section.settings.image | img_url: 'master' }}">
    <source media="(max-width:749px)" srcset="{{imgMobile | defaul: mainImg }}">
    <img src="{{ section.settings.image | img_url: 'master' }}" alt="{{ section.settings.image.alt }}">
  </picture
    {%  if section.settings.url != blank %}
      </a>
  {%  endif %}
</div>
  <style>
    .img-banner img,
    .img-banner picture {
      width: 100%;
    }
  </style>
{%  endif %}
{% schema %}
{
  "name": "Image banner",
  "tag": "section",
  "class": "section",
  "disabled_on": {
    "groups": ["header", "footer"]
  },
  "settings": [
    {
      "type": "image_picker",
      "id": "image",
      "label": "Desktop Image"
    },
    {
      "type": "image_picker",
      "id": "image_2",
      "label": "Mobile Image"
    },
     {
          "type":"url",
          "id":"url",
          "label":"Link To",
          "default":"/collections/all"
        }
    
  ],
  "presets": [
    {
      "name": "Image banner",
      "blocks": [
       
      ]
    }
  ]
}
{% endschema %}

 

4. Go Customize -> click eye icon to hide custom liquid -> add Image banner section

EBOOST_0-1712564402482.png

 

Hope can help


If you find my reply helpful, please hit Like and Mark as Solution


https://www.eboosttech.net


EBOOST
VitaVibe
Tourist
9 0 1

Hi,

 

Thanks for your help..

 

Regards,

Vitavibe