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
I managed to make the slideshow banner images at the top of my page clickable but it has created a white space that is also clickable under the footer on my homepage. Any ideas how to adjust so it is not adding anything below the footer? Site is blockyourears.com.au
Hey @Frankfurt ! I am curious if you found a solution to the extra white space that appeared just below the clickable slideshow images? I have the same thing and am hoping to clean that up.
I ended up restoring the slideshow code back to the original code and then using a different custom code to make the slideshow clickable. This one here https://community.shopify.com/c/shopify-design/making-a-slideshow-image-clickable-in-dawn-theme/m-p/...
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.
All the process is same but instead of opening the <a> tag on that place open it up were the media image <div> start | just replace the div to <a> tag and add the JASON id to call the link, That way your menu wi'll work fine and your slideshow will be clickable yahh!
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?
I tried following all the steps, but I dont see a new field to add a link after my slider image. Can you please help?
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 %}
>
Thank you so much! Your code works, resolves the z-index issue with the dropdown menus and is elegant. This should be the the accepted solution. To improve it further, here's the code which shows a pointer (the one with the hand's index finger pointing upwards) when hovering your mouse over the banner:
{% if block.settings.link %}
onclick="location.href = '{{ block.settings.link }}';"
style="cursor: pointer;"
{% endif %}
Another thing to note is that this code only works when the "Button link" field in the theme editor is populated with a url.
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.
Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024