All things Shopify and commerce
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!!
<div class="index-section">
{%- if section.settings.show_title -%}
<a href="/collections/{{collections[featured].handle}}"></a> AND <a href="{{ collections[featured].url }}"></a>
<h2 class="section-header__title">
{%- for block in section.blocks -%}
{{ collections[block.settings.collection].title }}
{%- endfor -%}
</h2>
{%- endif -%}
My webpage is backyardfresh.sg
Thanks!
It should be:
<div class="index-section">
{%- if section.settings.show_title -%}
<h2 class="section-header__title">
{%- for block in section.blocks -%}
<a href="{{ collections[block.settings.collection].url }}">{{ collections[block.settings.collection].title }}</a>
{%- endfor -%}
</h2>
{%- endif -%}
Thank you!! It works 🙂
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 🙂
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.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025