You’d need to edit your theme code for that. Go to Online Store > Themes and first create a backup by doing Actions > Duplicate. That’s just in case something messes up. Now let’s code by Actions > Edit code. In the editor’s left pane, open Sections / product-template.liquid and depending where you want this to show add something like
<ul class="product-tags">
{% for tag in product.tags %}
<li><a href="/collections/all/{{ tag | handleize }}">{{ tag }}</a></li>
{% endfor %}
</ul>
Please note though, this assumes you have a default all collection. If you have some other collection scheme, change appropriately. Also, doesn’t need to be a unordered list. Can be anything you prefer in HTML. The .product-tags CSS class doesn’t exist - you’d need to style that up as you want and visually prefer.
Thank you very much, I got it to work, but now like you said they’re just in a list which adds length to the page. Would you happen to have any recommendations for how to style these into a simple block of buttons with rounded corners like my reference? I’d like them to be the pink accent color of my theme
I’d really love if they were either like button 3, or button 6 when it comes to the appearance of each listed tag, and then to be listed side by side until they wrap to the next line, instead of a list.
I’m also having trouble with tags that have spaces. For example, I have a tag called kitchen + bar, which launches /collections/all/kitchen%20+%20bar, instead of /collections/all/kitchen-bar, which would work. I tried changing the tag to kitchen+bar, which launches /collections/all/kitchen+bar, but that didn’t work either. Anyone know how to create linkable tags with spaces that work? Thanks!
Thanks! Your code works perfect! Do you know how to have the results sort by; for example to have it sort Best selling instead of the default of A-Z. Thanks again!
This is just what I needed! How can I filter the tags to just colors and not include the first part of the word Color_Red? For example Colors: Red, Blue Green.