How can I add a hyperlink to collection headings on my main page?

Hi,

I want to add an hyperlink to the headings of the collections in my main page. Can someone help me?

I have tried adding the following to my products-slider.liquid section but it doesn’t work. Thanks!!

{%- if section.settings.show_title -%}

AND

{%- for block in section.blocks -%} {{ collections[block.settings.collection].title }} {%- endfor -%}

{%- endif -%}

My webpage is backyardfresh.sg

Thanks!

It should be:


{%- if section.settings.show_title -%}
## 
{%- for block in section.blocks -%}
{{ collections[block.settings.collection].title }}
{%- endfor -%}

{%- endif -%}
1 Like

Thank you!! It works :slightly_smiling_face:

1 Like

I tried it and it didn’t work. Just links to main page.

My answer is only suit for the specific case above.
If you have issue with it, you can send the site link or piece of code and I will help :slightly_smiling_face:

Hey there,

I have bundlefactory.com. We have the collections Hot Buys and Weekly Best Sellers on our homepage. I want to link those headings to their respective collections. How would I do this? I’m using Area 1.4.1.

Thank you.