Solved

How can I fix duplicate H1s due to product tags?

Michau00
Excursionist
19 0 4

Hi I have a problem with some of my H1s.

 

I have a lot of duplicates because products are tagged. 

 

For example this page has H1 tag "All products" https://www.laraheems.com/collections/all-products

 

This page also has all products but filtered by green colourhttps://www.laraheems.com/collections/all-products/colour_green . However, H1 is also "All Products". I have this problem on quite a few pages. Is there a way to do something like "All Products - Green"? I know I could do it by making collections but I prefer to tag the product as green. 

 

The theme I'm using is Impulse v.1.0

 

Thanks!

Accepted Solutions (2)

PageFly-Richard
Shopify Partner
4287 973 1626

This is an accepted solution.

Hi @Michau00 ,

 

This is Richard from PageFly - Landing page builder, I’d like to suggest this idea:
Step 1: Go to Online Store->Theme->Edit code
Step 2: Sections->/collection-header.liquid->Find  h1 tag has class="section-header__title" and replace this line code by below code:

<h1 class="section-header__title">
    {{ collection.title }}{% if current_tags %}-{{ current_tags }}{% endif %}
</h1>

I hope it would help you
Best regards,

Richard | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

View solution in original post

PageFly-Richard
Shopify Partner
4287 973 1626

This is an accepted solution.

Hi @Michau00 ,

 

You can try below code:

<h1 class="section-header__title">
    {{ collection.title }}{% if current_tags %}:{{ current_tags | replace: "_", " " | replace: "_", " " }}{% endif %}
</h1>

 

I hope it would help you
Best regards,

Richard | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

View solution in original post

Replies 5 (5)

MarinaPetrovic
Shopify Partner
559 124 182

Hi @Michau00 , that will require some custom coding, but of course it's possible. 
H1 is usually the title of the page that you write in admin, same goes for product pages, h1 is usually the product title.
In order to do this you should include your selected 'filter' name next to 

{{ collection.title }}

I can't tell you the exact solution since I'm not familiar with your code. 
🙂

M.Petrovic | Shopify Developer
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution

PageFly-Richard
Shopify Partner
4287 973 1626

This is an accepted solution.

Hi @Michau00 ,

 

This is Richard from PageFly - Landing page builder, I’d like to suggest this idea:
Step 1: Go to Online Store->Theme->Edit code
Step 2: Sections->/collection-header.liquid->Find  h1 tag has class="section-header__title" and replace this line code by below code:

<h1 class="section-header__title">
    {{ collection.title }}{% if current_tags %}-{{ current_tags }}{% endif %}
</h1>

I hope it would help you
Best regards,

Richard | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

Michau00
Excursionist
19 0 4

Hi!

 

This worked thanks! Now I have ALL PRODUCTS: COLOUR_GREEN. Do you know if I can remove the _?

PageFly-Richard
Shopify Partner
4287 973 1626

This is an accepted solution.

Hi @Michau00 ,

 

You can try below code:

<h1 class="section-header__title">
    {{ collection.title }}{% if current_tags %}:{{ current_tags | replace: "_", " " | replace: "_", " " }}{% endif %}
</h1>

 

I hope it would help you
Best regards,

Richard | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

nathanhuffhines
Tourist
9 0 5

I've tried both solutions in this thread on the Expanse theme, and nothing changes. Any ideas? I added it here and here (now removed) in the proper file.

 

nathanhuffhines_0-1711563980270.png