Get products by tag directly in liquid

New Member
3 0 0

Hello, I was curious to know if there was a known way to get list of products by tags directly in shopify.

I have seen solutions like this but iterating the whole catalogue seems quite dangerous as there is gonna be thousands of products, I dont want performances to be too bad.

 

Is there any pre-build arrays to get products by tags or variants directly in liquid?

Regards,

0 Likes
New Member
5 0 0

The best way is to create Smart Collection filtering products by each of predefined tags. And then iterate the matched collection with the tag.

For eg, if you want to filter products by tag "new", then create a Smart Collection with the rule of products tagged with "new". 

The rest is simple implementation in liquid.

0 Likes