How to show tagged products first in a collection?

Topic summary

  • Goal: Make products tagged “Hot” appear first across all collection pages without manual reordering.

  • Context: Manual sorting per collection isn’t feasible due to many “Hot” products and many collections.

  • Proposed approach: In the collection Liquid template, render the product loop twice—first loop outputs products that have the “Hot” tag; second loop outputs the remaining products while skipping those already shown.

  • Limitations: This workaround affects/throws off collection pagination (page counts and item distribution), and Shopify does not provide a native sort-by-tag option.

  • Status: No definitive resolution or code sample provided; discussion remains open for a robust solution that preserves pagination.

Summarized with AI on January 6. AI used: gpt-5.

I’m trying to figure out how to display products with a specific tag at the top of each collection page. Specifically, I want products tagged with “Hot” to appear first in every collection.

I’ve looked into the Shopify documentation and various forums, but I couldn’t find a straightforward solution. Can anyone guide me on how to achieve this?

I know I can change it manually on each collection but I can’t really do that because I have many “Hot” products and many collections.

Any code snippets, pointers, or suggestions would be greatly appreciated. Thank you!

Hi @devautoshop ,

You can put the loop code two times on the collection liquid file.

one will show the product has a valid tag on it and another will skip the product that has a tag on it, but this will impact the pagination of the collection.

there is no sorting available in Shopify for tags.