Shopify themes, liquid, logos, and UX
Hi!
I am looking for a solution to make my Slideshow Images Clickable in Dawn Theme. On clicking the image, it should be redirected to the assigned page. Can someone help me out here?
Thank you.
Solved! Go to the solution
This is an accepted solution.
Hello, here is the solution:
1. Open your theme,
2. Open slideshow.liquid
3. search for <div class="slideshow__text-wrapper banner__content banner__content--{{ block.settings.box_align }}
4. Place the following code above it:
<a href="{{ block.settings.image_link }}" style="display: block;position: absolute;width: 100%;height: 100%;left: 0;top: 0;z-index: 999;"></a>
After that, search for image_picker and paste this piece of code just after it:
{
"type": "url",
"id": "image_link",
"label": "Image Link"
},
Hi @sam1011 !
Since a complete solution would take quiet some effort, I can only tell you what you have to look for.
1. In order to make those images clickable, you would need to edit the image-banner.liquid-file. You can find this in Themes->Customize (go to ThemeEditor), click the 3 dots top left and click "Edit code". Then Sections -> image-banner.liquid.
2. Edit the liquid Schema-array in the bottom of the file, to make sure blocks (that represents a slide) gets a "link" property in the ThemeEditor.
3. You would need to edit the liquid/html code in order to add the link to every image dynamically, based on what has been inserted in the "link" property in each block in the ThemEditor.
If you are not familiar with theme dev / web dev at all, I would recommend to hire a professional for this task, since this unfortunately cannot be done with just a few clicks.
Best regards
This is an accepted solution.
Hello, here is the solution:
1. Open your theme,
2. Open slideshow.liquid
3. search for <div class="slideshow__text-wrapper banner__content banner__content--{{ block.settings.box_align }}
4. Place the following code above it:
<a href="{{ block.settings.image_link }}" style="display: block;position: absolute;width: 100%;height: 100%;left: 0;top: 0;z-index: 999;"></a>
After that, search for image_picker and paste this piece of code just after it:
{
"type": "url",
"id": "image_link",
"label": "Image Link"
},
Hi Jess-Macedo,
I tried to follow the steps. I see in the admin that now I can add the link, but still not working on the live site as a link. my site is bestdogparents.com Can you help me? Thanks.
Hi Gabe14,
Of course, let me help you with that.
I will need to take a look at your code.
I can request a collaborator request if you give me your store backend link and look into it. I am sending you a private message, you can reply there.
Hi Gabe14, you can email me at jeessica.macedo@gmail.com. The link is the one that shows to you when you are logged in to your homepage. It is always something like: xxxxxxxxx.myshopify.com
Hi. I just realised after following your steps, the slide overlapping the mega menu. I've changed <a href="{{ block.settings.image_link }}" style="display: block;position: absolute;width: 100%;height: 100%;left: 0;top: 0;z-index: 999;"></a> to z-index 3, but also just realised all links in all other pages are not working, except buttons. Please advice.
Worked for me!
thank you very much jess-macedo, its worked for me on dawn theme
Worked like a charm, Thanks a lot
Hi,
My slide show image is clickable, but it doesn't bring me to my linked page.
It's just keep bringing me back to the home page.
And also, I am not able to click on this after add in the coding.
Can please help on this?
Thanks
Hi @charles1024 , can you email me? jeessica.macedo@gmail.com
I will help you with that.
I too have this issue, looking for a solution.
My slideshow images are now clickable, but keeps bringing me back to the home page.
Hi. I have tried this but after pasting the second piece of code after the image_picker I get this error:
Unable to update the file
Any idea why?
Thank you!
Hi @SineN ,
You will have to add the second piece of code after the image_picker block ends (after }, ) and NOT exactly after the words image_picker ends.
Hi there!
I'm struggling with this - I pasted this after the image_picker block, and the slideshow is 'clickable' but just refreshes my page, doesn't bring me to the button links I've attached to each image.
The links from button won't work, after doing all this process you will see a new field on the backend, just after field where you choose the slider image, this is where you need to paste the link for it to work.
Hope that it helps!
Hi @AdityaC Thank you so much for your help!
However, now my drop down menu options aren't working for those items that are above my slideshow. Do you know how to fix this?
Hello,
I did as mentioned. The image is now clickable but I am facing an issue with dropdown menu links.
Dropdown menu links are not working on a desktop. On mobile, it's working fine.
https://whitedotsports.com/
Please can you help?
I'm also having this same issue. Wonderful solution otherwise, but it is making my drop down menu not clickable (only for those options that go over the banner) - https://dtfstation.com/
Any help is much appreciated!
This is happening to me as well!
Hi @seanaapsc ,
Looks like your dropdown menu is clickable now.
May I know what is your solutions for that?
Thanks
Unfortunately, I have just removed this code for now, as the drop-down menu is more vital to me than the slideshow links currently. But I would still love a resolution to making the slideshow images clickable while still being able to use the drop-down menu.
Oh just saw Jess-Macedo's reply about drop-down menu fix! Will try it and update if it works. Thank you!
This works "as a sharm" also on the Dawn 2.0 V-8.0 version!
Easy to implement 😉
Hi, I can't find image pickeris it in slideshow.liquid?
I have tried link is added successfuly but problem rises when i click on menu bar instead of clicking buttons it clicks image_slider showing at the background of menu.
How can i resolve this please?
This is workable but overlapping hero banner at site header menu due to z-index apply to avoid this bug please see below solution in code and screenshot:
<div
class="slideshow__slide grid__item grid--1-col slider__slide"
id="Slide-{{ section.id }}-{{ forloop.index }}"
{{ block.shopify_attributes }}
role="group"
aria-roledescription="{{ 'sections.slideshow.slide' | t }}"
aria-label="{{ forloop.index }} {{ 'general.slider.of' | t }} {{ forloop.length }}"
tabindex="-1"
{% if block.settings.link %}
onclick="location.href = '{{ block.settings.link }}';"
{% endif %}
>
Let me try this but my above code is working well thanks for your efforts.
Finally, I solved the problem by referring to the code in this article!
Hii
https://korefitness.in/ this is my store
I have implemented this whole process in my backend. but the problem is In mobile menu is not working properly. whenever I am clicking on it, there is a lot of problem.
In Desktop, whenever i am hover on menu, there is also lot of problem.
firstly please go to home page https://korefitness.in/ and then click the hamburger icon and then select the any option. If click then redirect the home page automatically
plz help me this problem as soon as possible
thanks & regards,
KUSHAL
Hi Kushal,
I checked your site and z-index is making the issue.
you need to apply another logic instead of z-index.
Check my above solution without z-index and with the onclick inline function in html.
Thanks!
Zain
I have tried everything, but it is not getting right. plz help me.
Hi Kushal,
I checked your site now your header menu is working properly what is issue now yesterday it was not working.
Thanks
Zain
Is this still working for 11.0 version? I am having a few issues
@wamccar I checked the release note of Dawn v11.0.0 and conclusion is that above solution will work with slideshow because nothings changed with slideshow code good luck.
Okay thank you, I am having issues where I put in the code and then I can add a link, but I can not add a photo. Any way you could help out here?
Hey Jess,
Any chance you could help me with this pls? £ $
If you could show me over zoom?
I dont mind going into code but this one seems a bit much for me lol
Thanks
As you've mentioned, after copying and pasting the code onto the banner, the links on the dropdown menu, which appears above the banner, are not working correctly. The problem is that when the dropdown menu items are clicked, the banner's link is being selected instead of the dropdown menu. To address this issue, please provide me with the specific code you're using, particularly related to the banner and the dropdown menu. This will allow me to provide more accurate guidance on how to resolve the problem.
As you've mentioned, after copying and pasting the code onto the banner, the links on the dropdown menu, which appears above the banner, are not working correctly. The problem is that when the dropdown menu items are clicked, the banner's link is being selected instead of the dropdown menu. To address this issue, please provide me with the specific code you're using, particularly related to the banner and the dropdown menu. This will allow me to provide more accurate guidance on how to resolve the problem.
Hey there!
I tried using this code and while the images are clickable on the slideshow, when i click on the image it gets redirected to the home page and not the product collection page as i desired.
Kindly help me with this
Thankyou 🙂
Hey Jess,
This is a great solution, thank you.
I'm wondering if you could help me develop it a step further - could I potentially set the image click to open a modal. In order to do so, I would need to put a selector in to set the data-target and data-toggle so each image opened a different modal. Do you think this would be possible?
Guys, here is the updated version for dropdown menus, I noticed a lot of you had this issue before, so here it goes:
"type": "url",
"id": "image_link",
"label": "Image Link"
},
Hi there!
I updated to this new version, and now my drop down menu is working again, but my slideshow is not clickable any more.
How do I have both my slideshow clickable and my drop down menu working?
still didn't work 😞
User | RANK |
---|---|
214 | |
166 | |
65 | |
54 | |
53 |
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023