Make Your Shopify Craft Theme Image Banners Fully Clickable (No More Sizing Woes!)
Hey everyone,
Ever found yourself staring at your beautiful Shopify Craft theme image banner, wishing the whole thing was clickable, not just that little button? You’re definitely not alone! It’s a super common request, and honestly, a bit of a head-scratcher when you first try to implement it. I recently saw a fantastic discussion pop up in the Shopify Community that tackled this exact issue, and I wanted to share the goldmine of insights we uncovered.
Our fellow store owner, A_Fern, kicked off the thread, explaining a familiar pain: trying to make their Craft theme banner fully clickable led to either a massively blown-up image or a frustrating syntax error. Sound familiar? We've all been there, tinkering with code only to have things go sideways.
The Challenge: Why Banners Resist Full Clickability
The Craft theme, like many others, is designed to have its image banner button as the primary call to action. When you try to wrap the entire banner content or even just the image itself in an (anchor) tag, you often run into layout issues. As ahsandoesntcare wisely pointed out, the tag can sometimes become the layout element, causing the image to lose its original sizing and object-fit rules. This is exactly what caused A_Fern's image to "blow up massively."
Here's an example of what that sizing issue can look like:
Community Solutions: A Spectrum of Approaches
The beauty of the Shopify community is how different experts jump in with various angles. Some, like Mustafa_Ali and ahsandoesntcare, suggested wrapping only the tag directly to try and prevent sizing issues, adding CSS like display:block;height:100% to the anchor. While this can work in some contexts, it still requires careful handling to avoid unintended side effects.
Then there was a more elegant solution that truly stood out, thanks to Ploqo’s detailed breakdown. This approach not only makes the entire banner clickable but also integrates seamlessly into your theme's customization options, giving you more control without breaking your existing design. It even keeps your original button clickable, allowing it to link to a different destination if you wish!
The Best Fix: Ploqo's Robust Solution for Craft Theme Banners
Ploqo's method directly addresses the sizing problem by creating an invisible, full-coverage link that sits on top of your banner, rather than trying to wrap the image itself. This preserves your image's original sizing and styling. Plus, it introduces new settings in your theme customizer, making it super easy to manage the banner link without diving back into code every time.
Here's how to implement it, step-by-step. Remember, as always, duplicate your theme before making any code edits! This is your safety net, folks.
Step-by-Step Guide: Making Your Craft Banner Fully Clickable
1. Access Your Theme Code:
- From your Shopify admin, go to Online Store > Themes.
- Find your Craft theme, click the … (three dots) button, and select Edit code.
- Open the file
sections/image-banner.liquid.
Here’s what that looks like:
2. Insert the Liquid and CSS Code:
- Find this line (it’s usually around line 120, but might vary slightly depending on your theme version):



