How can i make the product image in collection page clickable and send you to the product page.
https://jaccomcollection.com/collections/all
Thanks!
Issue: Product images on a collection page are not clickable; only the product title text currently links to the product page.
Solution: Wrap the product image HTML with an anchor (<a>) tag that links to the product page URL.
Implementation Steps:
collection.liquid, collection-template.liquid, or collection-product-grid.liquid)<img> tag with an anchor tag linking to product.urlExample Code:
<a href="{{ product.url }}">
<img src="{{ product.featured_image | img_url: 'large' }}" alt="{{ product.title }}">
</a>
Outcome: Each product image will now function as a clickable link to its respective product detail page, improving navigation and user experience.
How can i make the product image in collection page clickable and send you to the product page.
https://jaccomcollection.com/collections/all
Thanks!
Look at the liquid code for the page and wrap the html shown below with the anchor tag. Right now only the product title text is wrapped with an “<a href=…”
Hello @ArnauP
To make the product images on a collection page clickable so that they direct users to the respective product pages, you need to wrap each product image with an anchor () tag that links to the product page.
Here’s how you can do it:
liquid
Copy code
Wrap the image in an tag that links to the product page:
liquid
Copy code
Here’s an example of how the code might look inside the loop:
liquid
Copy code
{% for product in collection.products %}
{% endfor %}
This approach ensures that each product image on the collection page acts as a link to its detailed product page, improving navigation and user experience.
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.