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.
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.
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!
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?
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!
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!
User | RANK |
---|---|
242 | |
162 | |
64 | |
55 | |
46 |
Thanks to all who participated in our AMA with 2H Media on planning your 2023 marketing bu...
By Jacqui Mar 30, 2023Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023