Is it possible to sort a collection by tag?

7 0 1

Hello. I'm trying to implement a little feature to sort collections by a specific tag. Let me explain further:


This is not about filtering. Besides being able to sort by price and name, I would like to select a sort option that allows me to show products with a certain tag FIRST and then everything else.


Example: I have 5 products in the collection. Three of those products have the tag "purple", another one has the tag "green" and the last one has the tag "yellow". When selecting the "Sort by Purple" option from the select form, I would like the purple objects to show up first in the template, and then all the other ones (green and yellow) in no specific order.


Is it possible to do this? What would be the best course of action to achieve it? I know this is not ideal, but it's something that the client would like to have.


Thank you.

Replies 2 (2)

37 4 10

I have the same Question.  I would like a way to have my collections page "sorted" by-product Tags.. Or perhaps have the "Featured Collections" section available in the default template so that I can add multiple selections using the collection tags I want. 

Clayton Healy
Shopify Partner
32 0 2

Hi @DoiKikuta and @Lucky07this is Miriam from Kimonix app. You don’t have to work hard with implementing code for this - our app can help you with a click of a button 🙂

Simply use a sorter named “Tag(s) - score adjust” and add the tags you want to sort by.

This will sort your products in the collection based on the tags you want.

Here’s how it looks in the app:


You can also do the same based on Vendor or Product Type.


I suggest watching this short video to see how easy it is to sort a collection using the app.

We are a plug-and-play solution (we are not touching your code) so feel free to try the app.

Hope this helps and let me know if you have any questions! 🤗