Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: Dawn theme / H2 before H1 on product page

Solved

Dawn theme / H2 before H1 on product page

marion1234
Excursionist
20 1 6

Hello,

 

While improving our SEO, we noted that on all the product pages there is a H2 before H1.

That first H2 is for the text "added to the basket" (in French "Article ajouté au panier") which is displayed when the customer just added the product to his basket. This is causing us bad SEO rating.

How could we change so that this text is not a title but a simple paragraph ?

 

Here is an example of product page : https://kopajoy.fr/products/kestifoliz

Here is what I found in the code :

</sticky-header>

<cart-notification>
  <div class="cart-notification-wrapper page-width color-background-1">
    <div id="cart-notification" class="cart-notification focus-inset" aria-modal="true" aria-label="Article ajouté au panier" role="dialog" tabindex="-1">
      <div class="cart-notification__header">
        <h2 class="cart-notification__heading caption-large text-body"><svg class="icon icon-checkmark color-foreground-text" aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 9" fill="none">
  <path fill-rule="evenodd" clip-rule="evenodd" d="M11.35.643a.5.5 0 01.006.707l-6.77 6.886a.5.5 0 01-.719-.006L.638 4.845a.5.5 0 11.724-.69l2.872 3.011 6.41-6.517a.5.5 0 01.707-.006h-.001z" fill="currentColor"/>
</svg>
Article ajouté au panier</h2>

Thanks in advance for your help. Regards,

Marion 

Accepted Solution (1)
marion1234
Excursionist
20 1 6

This is an accepted solution.

We found the solution !

So in the file "cart-notification.liquid", we have replaced the <h2> before and after the "Added to the shopping cart" byt a <span> and it solved the issue.

Hopefully in a future version of the theme, this is corrected for everyone.

Thanks for all of you who put us on the lead of the solution !

View solution in original post

Replies 8 (8)

Zworthkey
Shopify Partner
5581 642 1583

@marion1234 
Go to the product.template.liquid file find the h1 tag and replace it with h2 tag.
Let me know if you need any more help.

thank you

marion1234
Excursionist
20 1 6

Hello @Zworthkey 

why would I replace the h1 tag by a h2 ? In that case I would have no more h1, this is even worse in terms of SEO I think. Or did I misunderstand your solution ?

Thanks

AvadaCommerce
Shopify Partner
3879 839 988

Hi @marion1234 ,

 

You try replace your code by below code:

</sticky-header>

<cart-notification>
  <div class="cart-notification-wrapper page-width color-background-1">
    <div id="cart-notification" class="cart-notification focus-inset" aria-modal="true" aria-label="Article ajouté au panier" role="dialog" tabindex="-1">
      <div class="cart-notification__header">
        <span class="cart-notification__heading caption-large text-body"><svg class="icon icon-checkmark color-foreground-text" aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 9" fill="none">
  <path fill-rule="evenodd" clip-rule="evenodd" d="M11.35.643a.5.5 0 01.006.707l-6.77 6.886a.5.5 0 01-.719-.006L.638 4.845a.5.5 0 11.724-.69l2.872 3.011 6.41-6.517a.5.5 0 01.707-.006h-.001z" fill="currentColor"/>
</svg>
Article ajouté au panier</span>

If you feel like my answer is helpful, please mark it as a SOLUTION. Let me know if you have any further questions.

banned
marion1234
Excursionist
20 1 6

Dear @AvadaCommerce 

thanks for taking the time to help us 🙂

Indeed I think your solution would work by replacing h2 with span (as suggested by @LDI too, thanks @LDI too!)  🙂

But where should I change this ? I have looked for a product.liquid but didn't find one in the Dawn template. I found a "cart-notification-product.liquid" but it has no h2.

Thanks for your help.

marion1234
Excursionist
20 1 6

This is an accepted solution.

We found the solution !

So in the file "cart-notification.liquid", we have replaced the <h2> before and after the "Added to the shopping cart" byt a <span> and it solved the issue.

Hopefully in a future version of the theme, this is corrected for everyone.

Thanks for all of you who put us on the lead of the solution !

epw
Visitor
3 0 0

Thanks for the solution.

LDI
Shopify Partner
82 5 39

Bonjour,
Looking at the source of that notification code, it doesn't matter where it is, so you can try to move all that is inside <cart-notification></cart-notification> to the bottom of the page below your H1 tag
Also you can just change that tag from <h2 class=...></h2> to <span class=...></span>, it won't make any difference

Want to edit your product images? Try PixPix image editor for Shopify

secantscope
Excursionist
18 0 21

if i'm not mistaken, this problem seems to be fixed since Dawn update v7.0.0