Shopify offers an automatic way for filtering collections, this is by using product tags. If you want to see only the products that have a specific tag from a collection, you can simply open a link like this:
Seems simple enough! A very useful tool if you have a high number of products and want to give your users a chance to filter for just what they are looking for. However, you might find yourself in the situation where while creating the products, the shop administrator used tags that contain capital letters like “One Size“ for example. If we want to create buttons for all the tags that the products in a collection have, the tag name read from Shopify for the button label will be One Size. For some reason we might need to create the URL for this button dynamically, so we have to be careful on this step because if we generate a link like:
This will not work and return 404 page. The link that we need to generate should look like this:
Because all of the URLs generated by Shopify for the tags have all of the letters in lowercase. So while generating the link for products that use a specific tag, we should first apply the handleize filter.
Check out your pages now and make sure none of them have capital letters in there, because there’s a chance you’re not controlling the tag creation, and even capital letters can break a webpage and severely impact your SEO value, and more importantly, any digital advertising that is pointing to the page as a landing page.
Don’t let a little error like this get in the way of your website’s success!