H1 Headings

MrsMacca
Excursionist
34 0 9

Good Evening All,

 

I have just added a "Featured Product" section to my homepage (Flex Theme) and the product's title has become a H1 heading, so now my website has 2 H1 headings. Does anyone know why this would happen and how to fix it.

 

TIA

Replies 6 (6)

JoshHighland
Shopify Expert
212 12 75

Google has stated that having a few H1 tags on a page doesn't really hurt SEO as long as they provide useful information to the user.

This is a good article on it - https://www.stanventures.com/blog/multiple-h1-tags/

SEO Manager - The FREE all-in-One SEO solution for Shopify
A powerful suite of SEO tools that gets you found in Google results

- Install SEO Manager -

MrsMacca
Excursionist
34 0 9

Thankyou for this article, but this info doesn't really help with answering the question I posed. I appreciate your time though.

swym
Explorer
57 5 22

Hey @MrsMacca

 

As you mentioned after adding the featured product section, your homepage now has 2 H1s, it is because the theme default structure adds the product title in an H1 tag. To remove the additional H1 tag coming from the featured product section you can follow the below steps: 

 

1. Duplicate your current live theme before making any changes. 

    Refer to this doc: https://help.shopify.com/en/manual/online-store/themes/managing-themes/duplicating-themes 

 

2. Open the theme file editor, by navigating to Online store > Themes > Click the three dots (...) > Edit code. 

 

3. Search for the "Featured Product" file in the sections folder. It can be by the name of "featured-product.liquid". 

 

4. Look for the code that is responsible for showing the product's title, the code might look something like as shown in the code below: 

 

<h1 class="product-title title">{{ product.title }}</h1>
----------------------------------------------------------------------
<h1 class="product-title title">{{ product.title | escape }}</h1>

 

 

5. Update the code by replacing the opening H1 (<h1>) tag with H2 tag (<h2>)  and closing H1 tag (</h1>) with closing H2 tags (</h2>). Such that your updated come becomes like: 

 

<h2 class="product-title title">{{ product.title }}</h2>
----------------------------------------------------------------------
<h2 class="product-title title">{{ product.title | escape }}</h2>

 

 

6. Done? Now try previewing the theme file to verify if the additional H1 tag is removed from the homepage. 

 

One important point to note is that these adjustments could bring potential design issues to the layout, like reduced font size and boldness for the heading, which you might need to fix. 

If you are not comfortable editing the code yourself, you should hire a Shopify developer, who will help you with these changes. 

 

I hope this helps! 

 

Regards, 

Abhishek from Swym

- Appreciate the assistance. Show your approval with a Like! And when your question finds its answer, seal the deal by marking it as an Accepted Solution!
- Our Solutions: Wishlist Plus | Swym Back in Stock Alerts | Swym Gift Lists and Registries
MrsMacca
Excursionist
34 0 9

Thankyou, I will give this a go

MrsMacca
Excursionist
34 0 9

Unfortunately there is nothing that looks like this in that section

 

swym
Explorer
57 5 22

Hey @MrsMacca

That's really weird. 

Can you please look for a possible file named "featured_product.liquid"? 

If not can you please search for files by the name "featured"  on your theme code directory under the sections folder and share a screenshot with me? As I did in the screenshot below: 

swym_0-1716140847545.png

 

Maybe then I can see the names of the file and tell you the name of the file that you need to edit?

 

Regards,

Abhishek from Swym

 

- Appreciate the assistance. Show your approval with a Like! And when your question finds its answer, seal the deal by marking it as an Accepted Solution!
- Our Solutions: Wishlist Plus | Swym Back in Stock Alerts | Swym Gift Lists and Registries