Personalized checkout and custom promotions with Shopify Scripts
using Tag Filtering, how would I populate a collection object in liquid? For example, say we have a related tag we're using lets say related-baseball-hats using https://www.mydomain.com/collections/all/related-baseball-hats I can see them all in search. But if I have a product and I pull the tag out, how can I bring back these related products into a collection to show on the product page. Is it possible to use liquid to return a collection based on tag filtering? What is the correct markup.
Thanks!
I was hoping something like this would work?
{% assign my_tagged_products = collection.products | where: "tags", "related-baseball-hats" %}
https://shopify.dev/docs/themes/navigation-search/filtering/tag-filtering
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025