Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi I've recently changed my collection header so the H1 includes Collection title and tag. For example Bracelets Colour Blue.
That's the code I am using.
<h1 class="section-header__title">
{{ collection.title}}{% if current_tags %}: {{ current_tags}} {% endif %}
</h1>
However, now I am getting BRACELETS: COLOUR_BLUE. How can I remove the _ between colour and blue?
Solved! Go to the solution
This is an accepted solution.
Hi @Michau00 ,
This is Kate from PageFly - Landing page builder, I’d like to suggest this idea:
You can remove the underscore between "colour" and "blue" by using the replace
filter in Liquid
<h1 class="section-header__title">
{{ collection.title }}{% if current_tags %}: {{ current_tags | join: ' ' | replace: '_', ' ' }} {% endif %}
</h1>
Hope my answer will help you.
Kate from PageFly Team
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Unlock the secrets to a record-breaking BFCM with PageFly and Canva
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
➜ Weekly updated Shopify tutorials on YouTube
All features are available from the Free plan. Live Chat Support is available 24/7.
Hi @Michau00 , you can change it to:
<h1 class="section-header__title">
{{ collection.title}}{% if current_tags %}: {{ current_tags | replace: "_", " "}} {% endif %}
</h1>
Hi!
Thanks but it's giving me BRACELETS: ["COLOUR BLUE"] now. How can I get rid of those ["?
This is an accepted solution.
Hi @Michau00 ,
This is Kate from PageFly - Landing page builder, I’d like to suggest this idea:
You can remove the underscore between "colour" and "blue" by using the replace
filter in Liquid
<h1 class="section-header__title">
{{ collection.title }}{% if current_tags %}: {{ current_tags | join: ' ' | replace: '_', ' ' }} {% endif %}
</h1>
Hope my answer will help you.
Kate from PageFly Team
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Unlock the secrets to a record-breaking BFCM with PageFly and Canva
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
➜ Weekly updated Shopify tutorials on YouTube
All features are available from the Free plan. Live Chat Support is available 24/7.
Hi!
Thanks but it's giving me BRACELETS: ["COLOUR BLUE"] now. How can I get rid of those ["?
You can try using my code, this display the tag as "COLOUR BLUE" without the square brackets, and with a space between "COLOUR" and "BLUE".
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Unlock the secrets to a record-breaking BFCM with PageFly and Canva
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
➜ Weekly updated Shopify tutorials on YouTube
All features are available from the Free plan. Live Chat Support is available 24/7.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025