How can I make my custom banners clickable on a minimal theme?

Solved

How can I make my custom banners clickable on a minimal theme?

KybeleConcept
Excursionist
29 1 15

Hello, 

 

I wanted to have different banners for mobile and desktop on the minimal theme, so created two custom sections:  desktop banner & mobile banner.

 

What I want to do next is to make them clickable, currently my desktop banner.liquid code under sections looks as follows:

 

{% if block.settings.image_link != blank %}
<a href="{{ block.settings.image_link }}">
{% endif %}
<div class="page-width yx-desktop-banner-container yx-mobile-hidden">
<div class="container-full">
{% for block in section.blocks limit: 1 %}
<img class="img-responsive lazyload" data-src="{{ block.settings.yx_image_picker | img_url: '2000x' }}" />
{% endfor %}
</div>
</div>
{% 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 %}
{% if section.settings.desktop_image != blank and section.settings.mobile_image != blank %}
<div class="banner-container">
<a href="YOUR_REDIRECTION_LINK_HERE">
<img class="yx-mobile-hidden" src="{{ section.settings.desktop_image | img_url: "master" }}">
<img class="yx-desktop-hidden" src="{{ section.settings.mobile_image | img_url: "master" }}">
</a>
</div>
{% endif %}

 

Can you please tell me where I should insert the relevant code to make these banners clickable?

 

Many thanks,

www.kybeleconcept.com

ro
Accepted Solutions (4)
KetanKumar
Shopify Partner
37094 3645 12053

This is an accepted solution.

@KybeleConcept 

thanks i have done pleas check also if same issue used below code 

yx-desktop-banner.liquid

{% if block.settings.image_link != blank %}
   <a href="{{ block.settings.image_link }}">
{% endif %} 
<div class="page-width yx-desktop-banner-container yx-mobile-hidden">
 <div class="container-full">
   {% for block in section.blocks limit: 1 %}
   <a href="{{ block.settings.button_link }}" class="slides__image-link">
    <img class="img-responsive lazyload"  data-src="{{ block.settings.yx_image_picker | img_url: '2000x' }}" />
   </a>
   {% endfor %}
</div>
</div> 
{% 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"
        },
     	{
          "type": "url",
          "id": "button_link",
          "label": "Image Link Desktop"
        }
      ]
    }

  ],

 "presets": [
    {
      "name": "YX Desktop Banner",
      "category": "Home",
"blocks":[{"type" : "image_picker"}]
    }
]
     
  }

{% endschema %}
{% stylesheet %}
{% endstylesheet %}
{% javascript %}
{% endjavascript %}

yx-mobile-banner.liquid

<div class="page-width yx-mobile-banner-container yx-desktop-hidden">
 <div class="container-full">
   {% for block in section.blocks limit: 1 %}
   <a href="{{ block.settings.button_link }}" class="slides__image-link">
    <img class="img-responsive lazyload"  data-src="{{ block.settings.yx_image_picker | img_url: '750x' }}" />
   </a>
   {% endfor %}
</div>
</div>

{% 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"
        },
	    {
          "type": "url",
          "id": "button_link",
          "label": "Image Link Mobile"
        }
      ]
    }
  ],
 "presets": [
    {
      "name": "YX Mobile Banner",
      "category": "Home",
      "blocks":[{"type" : "image_picker"}]
    }
 ]
}
{% endschema %}
{% stylesheet %}
{% endstylesheet %}
{% javascript %}
{% endjavascript %}

Kybele Concept _ Customize Minimal _ Shopify.png

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing

View solution in original post

KetanKumar
Shopify Partner
37094 3645 12053

This is an accepted solution.

@KybeleConcept 

its my pleasure to help us 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing

View solution in original post

KybeleConcept
Excursionist
29 1 15

This is an accepted solution.

Hello again @KetanKumar , I would as well like to make those banners full width on mobile and desktop view. Any possibility you could help me with that too? Or should I post that request under another topic? Many thanks in advance,

ro

View solution in original post

KetanKumar
Shopify Partner
37094 3645 12053

This is an accepted solution.

@KybeleConcept 

yes, please add this code

1. Go to Online Store->Theme->Edit code
2. Asset->/timber.scss.liquid->paste below code at the bottom of the file.

.template-index .main-content {
    max-width: 100%;
    padding: 0;
}

.template-index .main-content .shopify-section {
    max-width: 1340px;
    margin: 0px auto;
    padding: 0px 30px;
}

#shopify-section-1648652706e27ed3c0, #shopify-section-1648652701e885f30f {
    max-width: 100% !important;
    padding: 0px !important;
}

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing

View solution in original post

Replies 36 (36)

KetanKumar
Shopify Partner
37094 3645 12053

@KybeleConcept 

its mix up your code if possible to give me theme access so i will quick fix 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
KybeleConcept
Excursionist
29 1 15

Hello,

thanks for reaching out! what's your email address?

ro
KetanKumar
Shopify Partner
37094 3645 12053

@KybeleConcept 

sounds good

- Feel free to contact me on [email protected] regarding any help

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
KybeleConcept
Excursionist
29 1 15

Hello,

 

Just sent you the invite. There are two liquid codes:yx-desktop-liquid & yx-mobile-liquid

 

 

ro
KetanKumar
Shopify Partner
37094 3645 12053

This is an accepted solution.

@KybeleConcept 

thanks i have done pleas check also if same issue used below code 

yx-desktop-banner.liquid

{% if block.settings.image_link != blank %}
   <a href="{{ block.settings.image_link }}">
{% endif %} 
<div class="page-width yx-desktop-banner-container yx-mobile-hidden">
 <div class="container-full">
   {% for block in section.blocks limit: 1 %}
   <a href="{{ block.settings.button_link }}" class="slides__image-link">
    <img class="img-responsive lazyload"  data-src="{{ block.settings.yx_image_picker | img_url: '2000x' }}" />
   </a>
   {% endfor %}
</div>
</div> 
{% 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"
        },
     	{
          "type": "url",
          "id": "button_link",
          "label": "Image Link Desktop"
        }
      ]
    }

  ],

 "presets": [
    {
      "name": "YX Desktop Banner",
      "category": "Home",
"blocks":[{"type" : "image_picker"}]
    }
]
     
  }

{% endschema %}
{% stylesheet %}
{% endstylesheet %}
{% javascript %}
{% endjavascript %}

yx-mobile-banner.liquid

<div class="page-width yx-mobile-banner-container yx-desktop-hidden">
 <div class="container-full">
   {% for block in section.blocks limit: 1 %}
   <a href="{{ block.settings.button_link }}" class="slides__image-link">
    <img class="img-responsive lazyload"  data-src="{{ block.settings.yx_image_picker | img_url: '750x' }}" />
   </a>
   {% endfor %}
</div>
</div>

{% 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"
        },
	    {
          "type": "url",
          "id": "button_link",
          "label": "Image Link Mobile"
        }
      ]
    }
  ],
 "presets": [
    {
      "name": "YX Mobile Banner",
      "category": "Home",
      "blocks":[{"type" : "image_picker"}]
    }
 ]
}
{% endschema %}
{% stylesheet %}
{% endstylesheet %}
{% javascript %}
{% endjavascript %}

Kybele Concept _ Customize Minimal _ Shopify.png

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
KybeleConcept
Excursionist
29 1 15

Thank you sooo so much!!!!

ro
KetanKumar
Shopify Partner
37094 3645 12053

This is an accepted solution.

@KybeleConcept 

its my pleasure to help us 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
KybeleConcept
Excursionist
29 1 15

This is an accepted solution.

Hello again @KetanKumar , I would as well like to make those banners full width on mobile and desktop view. Any possibility you could help me with that too? Or should I post that request under another topic? Many thanks in advance,

ro
KetanKumar
Shopify Partner
37094 3645 12053

@KybeleConcept 

oh sorry please show me issue?

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
KybeleConcept
Excursionist
29 1 15
I have a banner on my website kybeleconcept.com, I would like to make it full width without any white spaces, both on desktop and mobile.

[Image.jpeg]
ro
KetanKumar
Shopify Partner
37094 3645 12053

@KybeleConcept 

sorry i can't see your attachment 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
KybeleConcept
Excursionist
29 1 15
Hello, I attached it again. it’s the banner under this link at the top of the page kybeleconcept.com[Image.jpeg]
ro
KybeleConcept
Excursionist
29 1 15

Hello again @KetanKumar , I attached the screenshots again, I would like to make them full width. Any possibility you could help? many thanks,

 

my website link is kybeleconcept.com

 

ro
KetanKumar
Shopify Partner
37094 3645 12053

@KybeleConcept 

please confirm this look

KetanKumar_0-1656400117119.png

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
KybeleConcept
Excursionist
29 1 15

Hello, confirmed.

ro
KetanKumar
Shopify Partner
37094 3645 12053

@KybeleConcept 

desktop and mobile right?

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
KybeleConcept
Excursionist
29 1 15

yes, for both. thanks so much in advance!

ro
KybeleConcept
Excursionist
29 1 15

Hello @KetanKumar any updates on this? looking forward to hearing from you

ro
KetanKumar
Shopify Partner
37094 3645 12053

This is an accepted solution.

@KybeleConcept 

yes, please add this code

1. Go to Online Store->Theme->Edit code
2. Asset->/timber.scss.liquid->paste below code at the bottom of the file.

.template-index .main-content {
    max-width: 100%;
    padding: 0;
}

.template-index .main-content .shopify-section {
    max-width: 1340px;
    margin: 0px auto;
    padding: 0px 30px;
}

#shopify-section-1648652706e27ed3c0, #shopify-section-1648652701e885f30f {
    max-width: 100% !important;
    padding: 0px !important;
}

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
KybeleConcept
Excursionist
29 1 15

thank you so mcuh!

ro
KetanKumar
Shopify Partner
37094 3645 12053

@KybeleConcept 

its my pleasure to help us 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
kybelestudios
Tourist
7 0 6

Hello again, 

 

you previously helped me on this topic perfectly, now I have a second store but am using dawn theme. I'd again like to have clickable custom banners for mobile & desktop. any possilibity you could help me on this? many thanks in advance,

KetanKumar
Shopify Partner
37094 3645 12053

@kybelestudios oh sorry for that issue can you please share your store url  so i will check and update you

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
kybelestudios
Tourist
7 0 6
Hello, I am building my store, kybelestudio.com

Using the dawn theme, but I need two different banners for mobile & desktop that are clickable. Dawn theme doesn’t provide that. Could you possibly help me with this?
KetanKumar
Shopify Partner
37094 3645 12053

@kybelestudios Thanks for url yes you have try this solution its work all theme 

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
KybeleConcept
Excursionist
29 1 15
Hello I just created two banners (desktop&mobile) with the exact same codes and the sections are successfully showing up on sections, but when I upload the images I dont see the images visible on website. What could be the reason?
ro
KetanKumar
Shopify Partner
37094 3645 12053

@KybeleConcept oh sorry but i can't see section  at your home page

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
kybelestudios
Tourist
7 0 6
Yes indeed, that’s actually the issue. I attach a screenshot for your reference. I copy pasted the mobile & desktop banner codes I had, the sections are showing up on the menu to add, but when I add the sections and upload images & save, on the live view the banners are not visible. What could be the issue? Many thanks again,

KetanKumar
Shopify Partner
37094 3645 12053

@kybelestudios oh sorry, don't worry about it if possible to you have add me a staff account so i will easy to check code and let you know what issue so please share details in DM

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
kybelestudios
Tourist
7 0 6

hello, I just sent you the invite. thanks a lot in advance!!

KetanKumar
Shopify Partner
37094 3645 12053

@kybelestudios 
Thanks for your all support

but sorry i can't see 

KetanKumar_0-1727268283855.png


i have give new code can you try this 
yx-desktop-banner.liquid

{% if block.settings.image_link != blank %}
   <a href="{{ block.settings.image_link }}">
{% endif %} 
<div class="page-width yx-desktop-banner-container yx-mobile-hidden">
 <div class="container-full">
   {% for block in section.blocks limit: 1 %}
   <a href="{{ block.settings.button_link }}" class="slides__image-link">
    <img class="img-responsive lazyload"  src="{{ block.settings.yx_image_picker | img_url: '2000x' }}" />
   </a>
   {% endfor %}
</div>
</div> 
<style>
@media (max-width: 749px) {.yx-mobile-hidden {display: none;}}
</style>
{% 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"
        },
     	{
          "type": "url",
          "id": "button_link",
          "label": "Image Link Desktop"
        }
      ]
    }

  ],

 "presets": [
    {
      "name": "YX Desktop Banner",
      "category": "Home",
"blocks":[{"type" : "image_picker"}]
    }
]
     
  }

{% endschema %}
{% stylesheet %}
{% endstylesheet %}
{% javascript %}
{% endjavascript %}

 
yx-mobile-banner.liquid

<div class="page-width yx-mobile-banner-container yx-desktop-hidden">
 <div class="container-full">
   {% for block in section.blocks limit: 1 %}
   <a href="{{ block.settings.button_link }}" class="slides__image-link">
    <img class="img-responsive lazyload"  src="{{ block.settings.yx_image_picker | img_url: '750x' }}" />
   </a>
   {% endfor %}
</div>
</div>
<style>
@media (min-width: 750px) {.yx-desktop-hidden {display: none;}}
</style>
{% 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"
        },
	    {
          "type": "url",
          "id": "button_link",
          "label": "Image Link Mobile"
        }
      ]
    }
  ],
 "presets": [
    {
      "name": "YX Mobile Banner",
      "category": "Home",
      "blocks":[{"type" : "image_picker"}]
    }
 ]
}
{% endschema %}
{% stylesheet %}
{% endstylesheet %}
{% javascript %}
{% endjavascript %}

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
kybelestudios
Tourist
7 0 6

it worked, thank you so so much. but the images are huge. what would need to be modified to adjust the site width?

kybelestudios_0-1727269415644.png

Screen Shot 2024-09-25 at 14.56.49.png

 

kybelestudios
Tourist
7 0 6

hello again, I just adjusted the width thanks to chatgpt. but thank you so much for the code it saved me sooo much time!!

KetanKumar
Shopify Partner
37094 3645 12053

@kybelestudios wow that would be great 

thanks for your all support 

if you want more customization please let me know on DM and email 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
kybelestudios
Tourist
7 0 6
Thank you so much I definitely will, I’m very thankful to your help every time.
KetanKumar
Shopify Partner
37094 3645 12053

@kybelestudios its my pleasure to help us.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on [email protected] regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing