How can I attach a link to my footer images?

How can I attach a link to my footer images?

Alien1919
Visitor
1 0 1

I want to add to my footer two small pictures but with link. In my footer section I have CUSTOM LINK that allows me to upload pictures but no link (see the picture).

custom_footer.jpg

Theme used: Dawn version 6.0.2

 

Please help me to add a link to the images that I want to put in my footer. Thank you

Replies 3 (3)

AvadaCommerce
Shopify Partner
3879 840 997

Hi @Alien1919 ,

 

You can check these steps below: 

 

Go to Admin > Online store > Themes > Actions > Edit code

Go to Section folder, and open the footer.liquid file

Then you can add this code between the  {%- when 'image' -%} and the  {%- endcase -%} as the photo: 

 

{% if block.settings.image_link %}<a href="{{ block.settings.image_link}}">{% endif %}
<div class="footer-block__details-content footer-block-image {{ block.settings.alignment }}">
{%- if block.settings.image != blank -%}
{%- assign image_size_2x = block.settings.image_width | times: 2 | at_most: 5760 -%}
<img
srcset= "{{ block.settings.image | image_url: width: block.settings.image_width }}, {{ block.settings.image | image_url: width: image_size_2x }} 2x"
src="{{ block.settings.image | image_url: width: 400 }}"
alt="{{ block.settings.image.alt | escape }}"
loading="lazy"
width="{{ block.settings.image.width }}"
height="{{ block.settings.image.height }}"
style="max-width: min(100%, {{ block.settings.image_width }}px);"
>
{%- else -%}
{{ 'image' | placeholder_svg_tag: 'placeholder-svg placeholder' }}
{%- endif -%}
</div>
{% if block.settings.image_link %}</a>{% endif %}

AvadaCommerce_0-1663249701104.png

find the image_picker under the {% schema %}, and paste the code after the }. Then click SAVE

,{
"type": "url",
"id": "image_link",
"label": "Image link"
},

you will have like this photo: 

AvadaCommerce_1-1663249853975.png

 

 

I hope it helps.

banned
Lrligons
Visitor
1 0 1

This did not work for me. All it did was add a second image but no link. Can someone please assist? My site is TheChattyChick.com and in my current theme, the "plant a tree" image links correctly however I am switching to Dawn and would like to get it to work before I publish the new theme. 

befitone
Visitor
2 0 0

Buna! Mai tii minte cum ai rezolvat? (daca ai rezolvat). Ce a scris @AvadaCommerce nu a functionat, nici nu m-a lasat sa il salvez. 

befitone_0-1733651945564.png

 

UPDATE: for those who didn't succed to edit it, this code from video works great:

https://www.youtube.com/watch?v=CNfEuLH0d7o&t=176s