Strip underscores from tag labels

Hello community, need a little help!

Looking for a little assistance with a conundrum that I had run into. Some background…Have Lightspeed POS setup and being fed into the shopify store. All tag creation is being handled through Lightspeed. Those tags are then being utilized as filterable options on the front-end. The problem is, I am unable to add a space between tags with more than two words. Lightspeed just simply does not offer the ability. So my alternative approach was to add underscores between tags that require more than one word. Hopeful this approach would offer an ability to remove the underscores within shopify, in some way. Ironically, that is also where I’ve hit a wall.

So my question would be, is there a method out there to achieve the desired outcome? Removal of underscores within tag labels.

Thank you!

Thank you!

When you talk about removing the underscores, is that in the sense of changing how they look on the front end, or a literally change within Shopify? Liquid could certainly change how they look but if they appear in a url the underscore would still be there.

I’d guess it’s just the display of them, but best to confirm before diving in to much.

In the meantime I would look at the Liquid replace filter. You could do something like this basic example:

{{ tag | replace: "_", " " }}