Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hi, there.
I found my page have redundant H1 tag about SEARCH and CART.
Have edited the H1 class to H2 in Shopify-Section-Search and Cart tempelet.
Unfortunately, the webpage showed that these two H1 tags still remaining.
How could I remove the mutiple H1 tags
It seems it didnt work in shopify-theme-edit code
Solved! Go to the solution
This is an accepted solution.
HI @mythgreece
I've checked the homepage and found two <h1> tags located within the cart drawer. It’s likely that other pages may also have this issue. Both of these <h1> tags are incorrect:
I checked the collection page as well and found three <h1> tags: two within the cart drawer and one for the page title.
To resolve this:
{% if template.name == "index" %}
<h1 style="display: none">{{ shop.name }}</h1>
{% endif %}
This code should be placed right under the <body> tag.
To find the two misplaced <h1> tags, you may need to look in the cart or cart-drawer.liquid files, depending on how the theme is structured. Since I’m unsure of the specific theme code, this is a general approach.
I hope this helps,
Best,
Daisy
Hi @mythgreece
Please share the URL of your store so I can check it further
Best,
Daisy
This is an accepted solution.
HI @mythgreece
I've checked the homepage and found two <h1> tags located within the cart drawer. It’s likely that other pages may also have this issue. Both of these <h1> tags are incorrect:
I checked the collection page as well and found three <h1> tags: two within the cart drawer and one for the page title.
To resolve this:
{% if template.name == "index" %}
<h1 style="display: none">{{ shop.name }}</h1>
{% endif %}
This code should be placed right under the <body> tag.
To find the two misplaced <h1> tags, you may need to look in the cart or cart-drawer.liquid files, depending on how the theme is structured. Since I’m unsure of the specific theme code, this is a general approach.
I hope this helps,
Best,
Daisy
Oh, I finally find the misplace H1 tags, thank you so much.
By the way, do you know how to add characters to H1 tags. As they suggest me to do so