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?
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024