list products by tag

Shopify Partner
9 0 1


Hello ,
In my online boutique we assign a tag to each product based on their collection (Eg SS22 = spring summer 2022 / FW22 = Autumn winter 2022)

Now we would like to see in our collection pages first the products containing the FW22 tag, then those with the FW21 tag and lastly the products containing the ss22 ... ss21 tag and so on.

Is there a way to do this without having to manually order the products?

I know I could sort them by date of addition, but some contuning products, this way they will always show at the bottom, even if they are new.

Thank you

Vittorio Citro
Replies 2 (2)
Shopify Partner
5931 537 1240

If this is a presentation matter then on the frontend this is an advanced customization making multiple collections being presented as one.


For admin sorting there's no simple way to do that as what you describe natively as those tag as are not purely alphabetical or simply numerical.


If products can be retitled adding a prefix may be one approach; keeping in mind the naming convention has to be alphabetical between these subcategories. Note this is different than changing the handle which would affect the url


A workaround may be if these product exist in only one collection to use the product CSV import. But it's been awhile so i'm not sure if the order of products is strictly respected when being added to a collection.


You might be able to lessen the ongoing manual burden by creating a flow in the free shopify-flow app to batch add products you select in the search admin by each tag in sequence.  


Apps like mechanic can be script to automate such a process though obviously they wont have such specific logic premade 




Save time & money ,Ask Questions The Smart Way

Confused? Busy? Get the solution you need

Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to

Shopify Expert
867 109 112

Hi @vittoriocitro 


Welcome to the Shopify Community!


You can use the following code.


{% if product.tags contains "FW22 " %}
 {% include 'product-list-item' %}
{% endif %}
{% if product.tags contains "FW21 " %}
 {% include 'product-list-item' %}
{% endif %}




If it’s helpful to you, please mark it as a solution.  

Need Help with Shopify Design, Migration, Speed, or Custom tasks?  
Try Our Conversion Booster app to get more sales | Connect Our Founder Linkedin