Adding a link to an image

Hello,

I want to add links to the images in this section. I have added it in the schema section but the link is not connecting to the image. Can someone help? I also added the line"

Screenshot 2024-03-23 at 1.37.15 PM.png

Site URL is thedenimlab.com

Thank you!

Hi

Can you clarify what you mean with “the link is not connecting to the image” and could you please post your liquid template code?

Best regards

Hello, I want to make the image clickable, attach a collection link to the image itself. This is my theme.liquid code:

{% if page_title == blank %}{{ shop.name }}{% else %}{{ page_title }}{% if current_page != 1 %} – {{ 'general.page' | t: page: current_page }}{% endif %}{% endif %}

{%- if page_description -%}

{%- endif -%}

{%- if settings.favicon -%}

{%- endif -%}

{%- comment -%}Few prefetch to increase performance on commonly used third-parties{%- endcomment -%}

{%- unless settings.heading_font.system? -%}

{%- endunless -%}

{%- unless settings.text_font.system? -%}

{%- endunless -%}

{%- render ‘social-meta-tags’ -%}
{%- render ‘microdata-schema’ -%}
{%- render ‘css-variables’ -%}
{%- render ‘js-variables’ -%}

{%- if request.page_type == ‘gift_card’ -%}

{%- endif -%}

{% render ‘boost-sd-fallback’ %}
{{ content_for_header }}

{{- ‘theme.css’ | asset_url | stylesheet_tag: preload: true -}}

.container.container--lg { max-width: 1400px; margin: 0 auto; }

{% liquid
assign features_class = ‘’

if settings.show_button_transition
assign features_class = features_class | append: 'features–button-transition ’
endif

if settings.show_image_zoom_on_hover
assign features_class = features_class | append: 'features–zoom-image ’
endif

if settings.show_page_transition
assign features_class = features_class | append: 'features–page-transition ’
endif
%}

{% if template%}
{% section ‘header’ %}
{% endif %}

{% if template %}
{% section ‘announcement-bar2’%}
{% endif %}

{% if template == ‘index’ %}
{% section ‘header2’ %}
{%endif %}

{% if page.url contains ‘mens’ %}
{% section ‘header3’ %}
{%endif %}

{% if collection.tags contains ‘MENS’ %}
{% section ‘header3’ %}
{%endif %}

{% if collection.tags contains ‘WOMENS’ %}
{% section ‘header2’ %}
{%endif %}

{% if product.tags contains ‘WOMENS’ %}
{% section ‘header2’ %}
{%endif %}

{% if page.url contains ‘womens’ %}
{% section ‘header2’ %}
{%endif %}

{% if product.tags contains ‘MENS’ %}
{% section ‘header3’ %}
{%endif %}

{%- render 'shadow-dom-templates' -%}


{{ ‘general.accessibility.skip_to_content’ | t }}

{%- comment -%} This allows our theme to track when the user has scrolled a given amount of pixels, without relying on a global scroll listener. This helps to improve performance and reduce reflows. {%- endcomment -%}

{%- if request.page_type != ‘password’ -%}
{%- sections ‘header-group’ -%}
{%- sections ‘overlay-group’ -%}
{%- endif -%}

{{ content_for_layout }}

{%- comment -%}
IMPLEMENTATION NOTE: For best semantics, having the footer group outside the main would be slightly better, but
moving it inside the main allows to have all the sections (including sections inside the footer group) to be
consecutive, and hence having a cleaner margin collapsing management.
{%- endcomment -%}
{%- if request.page_type != ‘password’ -%}
{%- sections ‘footer-group’ -%}
{%- endif -%}

@media screen and (max-width: 767px){ { display: none; } @media (max-width: 749px) { #shopify-section-header2 { display: none !important; } } @media (max-width: 749px) { #shopify-section-header3 { display: none !important; } } .shopify-section-template--15437377667146__media_grid_wG4F67{ max-width: 1400px; margin: 0 auto; } @media (min-width: 749px) { #shopify-section-template--15437377798218__collection_list_6DjR7f{ max-width: 1400px; margin: 0 auto; } @media (max-width: 749px) { #shopify-section-template--15437377667146__instant_w_f7l_w_kpkyff_c_ln_lg_8NpWJX { display: none !important; } } @media (min-width: 749px) { #shopify-section-template--15437377667146__collection_list_TTdrKr { display: none !important; } }

Below are the images I want to make clickable. The only item clickable is the “Shop Now”

Hi

Unfortunately, the code you posted does not look like the section in the screenshot. Please post only this section so that I can help.

Best regards

{% comment %} This file is generated by Instant and can be overwritten at any moment. {% endcomment %}

{{ 'instant-wF7lWKpkyffCLnLg.css' | asset_url | stylesheet_tag }} {%- style -%} .__instant[data-section-id='{{ section.id }}'] div[data-instant-type='root'] { padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px; padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px; }

@media screen and (min-width: 769px) {
.__instant[data-section-id=‘{{ section.id }}’] div[data-instant-type=‘root’] {
padding-top: {{ section.settings.padding_top }}px;
padding-bottom: {{ section.settings.padding_bottom }}px;
}
}
{%- endstyle -%}

{%- liquid assign loading = 'eager' assign fetchpriority = 'auto' if section.location == 'footer' assign loading = 'lazy' elsif section.location == 'header' assign fetchpriority = 'high' elsif section.location == 'template' if section.index == 1 assign fetchpriority = 'high' elsif section.index > 2 assign loading = 'lazy' endif endif -%}

{{ section.settings.text_gw8fGpGkYQYDed78 }}

{{ section.settings.text_iGB725rDXO7fTxp2 }} {% if section.settings.image_daePdLiSNrwlalXA and section.settings.image_daePdLiSNrwlalXA != blank %} {{ section.settings.image_daePdLiSNrwlalXA | image_url: width: 1920 | image_tag: class: 'idaePdLiSNrwlalXA', alt: section.settings.image_daePdLiSNrwlalXA.alt, fetchpriority: fetchpriority, loading: loading, decoding: 'async' }} {% else %} Placeholder {% endif %}

{{ section.settings.text_vVhhLHnotGtuvcKU }}

{{ section.settings.text_Di13ev4LoYuzgZlR }} {% if section.settings.image_VDYYP6SzRnNLdrNl and section.settings.image_VDYYP6SzRnNLdrNl != blank %} {{ section.settings.image_VDYYP6SzRnNLdrNl | image_url: width: 1920 | image_tag: class: 'iVDYYP6SzRnNLdrNl', alt: section.settings.image_VDYYP6SzRnNLdrNl.alt, fetchpriority: fetchpriority, loading: loading, decoding: 'async' }} {% else %} Placeholder {% endif %}

{{ section.settings.text_40rXVCXfgqPgxzjh }}

{{ section.settings.text_Do6NKhff6KkI9YOQ }} {% if section.settings.image_CuL8VPjrd2uTxLjn and section.settings.image_CuL8VPjrd2uTxLjn != blank %} {{ section.settings.image_CuL8VPjrd2uTxLjn | image_url: width: 1920 | image_tag: class: 'iCuL8VPjrd2uTxLjn', alt: section.settings.image_CuL8VPjrd2uTxLjn.alt, fetchpriority: fetchpriority, loading: loading, decoding: 'async' }} {% else %} Placeholder {% endif %}
{% schema %} { "name": "Section", "tag": "section", "disabled_on": { "groups": ["header", "footer"] }, "settings": [ { "type": "inline_richtext", "id": "text_gw8fGpGkYQYDed78", "label": "Text", "default": "ACCESSORIZE EVERY OUTFIT" }, { "type": "url", "id": "url_HRHYwPHujkib6ppv", "label": "Button URL" }, { "type": "inline_richtext", "id": "text_iGB725rDXO7fTxp2", "label": "Text", "default": "Shop Now" }, { "type": "image_picker", "id": "image_daePdLiSNrwlalXA", "label": "Image" }, { "type": "inline_richtext", "id": "text_vVhhLHnotGtuvcKU", "label": "Text", "default": "SPRING DRESSES" }, { "type": "url", "id": "url_xF38VXnhOrToZE5u", "label": "Button URL" }, { "type": "inline_richtext", "id": "text_Di13ev4LoYuzgZlR", "label": "Text", "default": "Shop Now" }, { "type": "image_picker", "id": "image_VDYYP6SzRnNLdrNl", "label": "Image" }, { "type": "inline_richtext", "id": "text_40rXVCXfgqPgxzjh", "label": "Text", "default": "DENIM FOR DAYS" }, { "type": "url", "id": "url_sWF5IFC5ynnBj8IE", "label": "Button URL" }, { "type": "inline_richtext", "id": "text_Do6NKhff6KkI9YOQ", "label": "Text", "default": "Shop Now" }, { "type": "image_picker", "id": "image_CuL8VPjrd2uTxLjn", "label": "Image" }, { "type": "header", "content": "Section padding" }, { "type": "range", "id": "padding_top", "min": 0, "max": 100, "step": 4, "unit": "px", "label": "Top padding", "default": 0 }, { "type": "range", "id": "padding_bottom", "min": 0, "max": 100, "step": 4, "unit": "px", "label": "Bottom padding", "default": 0 } ], "presets": [ { "name": "Section", "settings": { "text_gw8fGpGkYQYDed78": "ACCESSORIZE EVERY OUTFIT", "text_iGB725rDXO7fTxp2": "Shop Now", "text_vVhhLHnotGtuvcKU": "SPRING DRESSES", "text_Di13ev4LoYuzgZlR": "Shop Now", "text_40rXVCXfgqPgxzjh": "DENIM FOR DAYS", "text_Do6NKhff6KkI9YOQ": "Shop Now" } } ] } {% endschema %}