All things Shopify and commerce
Hello! I would like to know if its possible to make the Featured Collection heading a link so that you can click it and go to that collection. Any help appreciated 🙏🏽
Solved! Go to the solution
This is an accepted solution.
In the featured-collection.liquid file on line 52, you'll see this
<h2 class="title {{ section.settings.heading_size }}">{{ section.settings.title | escape }}</h2>
replace it with
{%- if section.settings.title != blank and section.settings.heading_url == nil -%}
<h2 class="title {{ section.settings.heading_size }}">{{ section.settings.title | escape }}</h2>
{%- endif -%}
{% if section.settings.heading_url != blank and section.settings.heading_url != blank %}
<a href="{{ section.settings.heading_url }}" class="title {{ section.settings.heading_size }}" >{{ section.settings.title }}</a>
{% endif %}
Then you scroll down to the schema below this code,
{
"type": "text",
"id": "title",
"default": "Featured collection",
"label": "t:sections.featured-collection.settings.title.label"
},
right after the comma add this code
{
"type": "url",
"id": "heading_url",
"label": "URL for heading"
},
This is an accepted solution.
In the featured-collection.liquid file on line 52, you'll see this
<h2 class="title {{ section.settings.heading_size }}">{{ section.settings.title | escape }}</h2>
replace it with
{%- if section.settings.title != blank and section.settings.heading_url == nil -%}
<h2 class="title {{ section.settings.heading_size }}">{{ section.settings.title | escape }}</h2>
{%- endif -%}
{% if section.settings.heading_url != blank and section.settings.heading_url != blank %}
<a href="{{ section.settings.heading_url }}" class="title {{ section.settings.heading_size }}" >{{ section.settings.title }}</a>
{% endif %}
Then you scroll down to the schema below this code,
{
"type": "text",
"id": "title",
"default": "Featured collection",
"label": "t:sections.featured-collection.settings.title.label"
},
right after the comma add this code
{
"type": "url",
"id": "heading_url",
"label": "URL for heading"
},
Amazing!! Thanks so much! That worked 🙏🏽🙏🏽
One small problem, I had the Featured Collection headings centered above the carousel and when I added the URL to titles in theme customizer they all went back to original left side position.. any way to get them back centered while keeping the link ? Thanks so much so far for all your help! 🙏🏽🙌🏽
How do you get this to be centered? How do you show without it underlined? My text was centered prior to adding the above code.
Hi there. Would this be the same on version 11?
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024