Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hey all!
Currently in the process of updating my company's Dawn Theme to 10.0.0 (I know they are now on 11.0.0, but I started a little while ago, we have a lot of previous customisations and a new design for the site on top of that haha - I have checked the code for 11.0.0, and this is the same in there too) .
Just in the process of adding/removing stuff in the main-product.liquid section and came across the following:
{%- when 'title' -%}
<div class="product__title" {{ block.shopify_attributes }}>
<h1>{{ product.title | escape }}</h1>
<a href="{{ product.url }}" class="product__title">
<h2 class="h1">
{{ product.title | escape }}
</h2>
</a>
</div>
When looking on the site, the a tag is hidden with css display:none.
My question is - what is the purpose of this?
Why would you link to the page you are currently on? Why is there an h2 tag with an h1 class, that is all hidden?
Wary of getting rid of it if it serves a purpose, but I can't think of what the purpose would be haha.
Thanks in advance!
Solved! Go to the solution
This is an accepted solution.
Hey all,
Just in case anyone is looking this up in the future, I've figured this out haha.
The html from the product page is shown in the product's modal on the collection page. The second product title in the <a> tag is shown instead of the H1 on there - I assume for H hierarchy purposes and not having 21/31 H1s on the collection page from all the modals.
Also explains the <a> tag that links to the product's product page haha.
This is an accepted solution.
Hey all,
Just in case anyone is looking this up in the future, I've figured this out haha.
The html from the product page is shown in the product's modal on the collection page. The second product title in the <a> tag is shown instead of the H1 on there - I assume for H hierarchy purposes and not having 21/31 H1s on the collection page from all the modals.
Also explains the <a> tag that links to the product's product page haha.
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025