Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
On my site here, there are two "Image WIth Text" sections below (one for a podcast, one for discord) that have a call to action button, but the entire section is hyperlinked to the button's directory.
https://emerymusic.com/pages/join-emeryland
I'm trying to NOT have this happen, as I have other parts of the website where in the text part of the section, I have a separate hyperlink, or at least for that text to be able to be highlighted for someone to copy/paste. Below, this section doesn't work because the user can't click the helpful reference link or copy/paste the rss feed link.
Hi,
Need to adjust the HTML and/or CSS of your Shopify theme
Edit the image-with-text.liquid file (or similar) to ensure only the CTA button is wrapped in a hyperlink
Code example
Before code example
<a href="{{ cta_link }}" class="image-with-text-link">
<div class="image-with-text">
<img src="{{ image_url }}" alt="Image">
<div class="text-content">
<h2>{{ title }}</h2>
<p>{{ text }}</p>
</div>
<button class="cta-button">{{ button_text }}</button>
</div>
</a>
and after code example
<div class="image-with-text">
<a href="{{ cta_link }}" class="cta-button">{{ button_text }}</a>
<img src="{{ image_url }}" alt="Image">
<div class="text-content">
<h2>{{ title }}</h2>
<p>{{ text }}</p>
</div>
</div>
Adjust css if required and also check for Mobile Responsiveness
Thanks for the info, I'll take a look at this! Could you point me in the direction of where to find this liquid file?
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
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