Another way to do it, which is closer to what you initially needed, is to follow the steps below.
-
Go to ‘Online Store’ → Themes
-
From your Active Theme → Click on the 3 dots (…) → Edit Code
-
Inside the sections folder locate the file ‘multicolumn.liquid’.
-
Copy the entire code of the above file.
-
Create a new file inside the sections folder called ‘multicolumn-backup.liquid’
-
Paste the code in the new file you created
-
Modify the ‘multicolumn.liquid’ file as below:
-
Find the
element with class name “multicolumn-card__image-wrapper multicolumn-card__image-wrapper–” -
Inside the
element mentioned above, there should be something like this:
- Replace the above code with this
{% if block.settings.link != blank %}
{% else %}
{% endif %}
-
Then in your theme’s customization, you can add a link to each multicolumn block(shown below). This allows you to click on the image to navigate to the intended page, even if the link label is not specified.
-
Finally, you can add CSS code to control the image’s opacity when hovering over it, as shown below:
- Go to ‘Online Store’ → Themes
- From your active theme → click on the 3 dots (…) → Edit Code
- In the assets folder locate the file ‘section-multicolumn.css’
- At the end of the file add the below code:
.multicolumn-custom-link img {
transition: opacity 0.16s ease-in-out;
}
.multicolumn-custom-link img:hover {
opacity: 0.7;
}
