How To Add Link To Footer Image In Dawn Theme

Step 1:

Find the following code in footer.liquid file:

<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: 760 }}"
                            alt="{{ block.settings.image.alt | escape }}"
                            loading="lazy"
                            width="{{ block.settings.image.width }}"
                            height="{{ block.settings.image.height }}"
                          >

Add replace it with the following code above it:

<a href="{{ block.settings.link }}">

<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: 760 }}"
                            alt="{{ block.settings.image.alt | escape }}"
                            loading="lazy"
                            width="{{ block.settings.image.width }}"
                            height="{{ block.settings.image.height }}"
                          >
</a>

Step 2:

Find the following code in footer.liquid file:

"default": "center"
        }

And replace it with the following code:

"default": "center"
        },
{
    "type": "url",
    "id": "link",
    "label": "Link"
}
4.4/5 - (7 votes)

About

Leave a Comment

Your email address will not be published. Required fields are marked *