I’d like to add tags to the product detail page. Tags that I added aren’t showing up. Is it because of my template doesn’t have tags? How can I enable it?
Topic summary
A user is unable to display product tags on their product detail page using the Reformation theme. The tags exist but aren’t visible, likely because the theme doesn’t include tag display functionality by default.
Solution provided:
- Edit the product template code in the theme editor
- Navigate to: Online Store > Themes > Edit Code
- Locate the product template file (typically
product-template.liquidormain-product.liquidin the Sections folder) - Insert Liquid code to loop through and display product tags
- Optionally add CSS styling for visual formatting
Additional context:
Another participant mentioned developing an app that displays product tags and creates SEO-friendly hidden collections, with upcoming features for showing tags in collection pages. The app reportedly generates beneficial URL structures for search engine optimization.
@Shay20241 - may be template do not have tags by default, if that is the case then need to edit the product template code to add tags
Hey folks, just been doing a bit of research on here as we have just launched a new app that displays product tags live on apps. The really cool bit is it also creates hidden collections of those tags that are great for SEO. We also have an update coming out in a few weeks that will show the tags in collections. I’ve got a rough version of this update own my own Shopify site (selling Scottish art) and the results with google are amazing as it creates really cool URL’s. An example would be if a collection url was collections/scottish-prints and a product in this collections was tagged Edinburgh (for example) the URL would then be collections/scottish-prints/edinburgh and google is certainly loving these URL’s. I’m not sure if I would be allowed to post the link to the app on the app store on here as I am quite new to all this and don’t want to rock the boat - so if anyone knows If I can post the link then great or I’m guessing I could DM you with it. Only if you are interested in having a look of course
(we are also really interested in getting feedback/suggestions as this is the first version of the app). Ta, Kevin from Clyde Built Tech
Hi @Shay20241
Tags Are Not Showing on the Product Page:
That’s because Shopify themes don’t display product tags on the front-end unless the template is coded to do so.
-
Open Your Theme Editor
Go to: Online Store > Themes > Edit Code -
Find the Product Template
In the Sections folder, open:
‘product-template.liquid’ or ‘main-product.liquid’ (depending on your theme) -
Add This Code Where You Want Tags to Appear
Paste the following Liquid code inside the product form section or wherever you want the tags to appear (e.g., below the title or description):
{% if product.tags.size > 0 %}
<div class="product-tags">
<strong>Tags:</strong>
<ul>
{% for tag in product.tags %}
<li>{{ tag }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
- You can also add styling in your theme.css file if needed.
.product-tags {
margin-top: 15px;
font-size: 14px;
}
.product-tags ul {
list-style: none;
padding: 0;
display: flex;
flex-wrap: wrap;
}
.product-tags li {
background-color: #f1f1f1;
margin: 4px;
padding: 6px 10px;
border-radius: 12px;
}