# Filter Shopify Collections by In-Stock Size (2026)

Canonical: https://joinagentready.com/blog/how-to-filter-by-size-in-stock-on-shopify-on-the-collection-page

[By Dylan Hunt](https://joinagentready.com/authors/dylan-hunt) April 22nd, 2026 [How-to notes](https://joinagentready.com/blog/topics/how-to-guides)

Written by the Caffeine and Commerce team. For build work, see [caffeinecommerce.com](https://caffeinecommerce.com/).

This guide is fully updated for 2026 and Online Store 2.0. When the original version was written, Shopify had no built-in way to filter a collection by which sizes were in stock, so the trick was to tag every product by size and lean on the old tag-based URL filtering with a bit of jQuery. That approach is now obsolete: themes no longer ship jQuery, tag-based collection filtering has been replaced, and Shopify filters by variant availability natively. Here is the current, far simpler way.

## The short version

Shopify can do this out of the box now. Turn on the **Availability** filter and the **Size** option filter in **Search & Discovery**, and shoppers can narrow a collection to the sizes that are in stock without you tagging anything or writing any code. Most stores need nothing beyond that.

## The easy way: native variant filters (recommended)

1.  Install Shopify's free **Search & Discovery** app (made by Shopify) if it is not already on your store.
2.  Open **Search & Discovery → Filters**.
3.  Add the **Availability** filter. This gives shoppers an "In stock" toggle.
4.  Add a filter for your size option (often **Size**, sometimes a custom option name). Shopify reads it straight from your variants, so there are no tags to maintain.
5.  Save. On a modern theme (anything Online Store 2.0, including Dawn) the filters appear on every collection page automatically.

Now when a shopper selects **In stock** and a size, Shopify shows only the products that have that size available. Because it filters on real variant inventory, out-of-stock sizes drop out on their own. No size tags, no product-by-product tagging, no script.

You can even link straight to a filtered view. The filters are plain URL parameters:

```text
/collections/all?filter.v.availability=1&filter.v.option.size=Medium
```

That URL shows every in-stock Medium in the collection, which is handy for ads, email, and internal merchandising links.

## Why the old tag method is gone

If you are maintaining the old approach, here is why it is worth retiring:

-   **No more jQuery.** Online Store 2.0 themes do not load jQuery, so the original script silently does nothing on a current theme.
-   **Tag filtering was replaced.** Shopify moved collection filtering from the old `/collections/handle/tag` and `current_tags` system to native, variant-aware storefront filters. The new system understands inventory, the tag system never did.
-   **No tagging chore.** The most painful step before was tagging every product with its sizes. Native filters read variants directly, so that entire job disappears.

## If you need custom behavior

Native filters cover the vast majority of stores. A few teams still want something the standard filter set does not do, for example a single combined "size in stock" control with bespoke styling, or hiding a product card entirely when the chosen size is sold out rather than relying on the filter result.

That is doable in an Online Store 2.0 theme, but it is genuine theme development: you read the variant data in the collection section (usually `card-product.liquid` or your product card snippet), respect the active `filter.v.option.*` parameters Shopify puts in the URL, and render with vanilla JavaScript rather than jQuery. It is very store-specific, so there is no one snippet that drops in cleanly across themes.

If that is where you are headed, we build custom Shopify collection and filtering experiences. Tell us the exact behavior you want and we will build it on your theme.

## The takeaway

What used to take product tags, a Liquid loop, and a jQuery script is now a few clicks in Search & Discovery. Turn on Availability plus your size option filter, and shoppers get an accurate, in-stock-only size filter with zero maintenance. Only reach for custom code when you need behavior the native filters genuinely cannot express.

Good collection filtering is one piece of a well-structured storefront. For the rest, see [making Shopify collection pages SEO-friendly](https://joinagentready.com/blog/shopify-collection-pages-seo), and if you want richer variant detail on the product page without an app, [showing metafields on a product page](https://joinagentready.com/blog/show-metafields-shopify-product-page-without-app) is the companion job.

While you are tidying up the storefront, it is worth checking how legible your store is to AI shopping assistants too. Our [free Shopify AI readiness checker](https://joinagentready.com/tools/shopify-ai-readiness-checker) gives you a quick read.

Quick answers

## Frequently asked questions

**Can Shopify filter a collection by which sizes are in stock without tags?**

Yes. On Online Store 2.0 themes you turn on the Availability filter and your Size option filter in Search & Discovery, and shoppers can narrow a collection to in-stock sizes with no tagging and no code. Because it filters on real variant inventory, out-of-stock sizes drop out on their own.

**Why does the old jQuery size-tagging method no longer work?**

Online Store 2.0 themes no longer load jQuery, so the original script silently does nothing on a current theme. Shopify also moved collection filtering from the old tag-based system to native, variant-aware storefront filters that understand inventory, which the tag system never did. That removes the chore of tagging every product with its sizes.

**Can I link directly to an in-stock size filter on Shopify?**

Yes. The native filters are plain URL parameters, so a link like /collections/all?filter.v.availability=1&filter.v.option.size=Medium shows every in-stock Medium in the collection. That makes it easy to point ads, email, and internal merchandising links at a pre-filtered view.

Dylan Hunt

Author

[Dylan Hunt](https://joinagentready.com/authors/dylan-hunt)

Builds Shopify catalog readability and AI answer visibility at AgentReady and Caffeine and Commerce.

[About Dylan →](https://joinagentready.com/authors/dylan-hunt)

## Comments

Every comment here comes from a verified email. Write yours, confirm from your inbox, and it's live.

Loading comments…

Share [X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fjoinagentready.com%2Fblog%2Fhow-to-filter-by-size-in-stock-on-shopify-on-the-collection-page&text=Filter%20Shopify%20Collections%20by%20In-Stock%20Size%20\(2026\)) [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fjoinagentready.com%2Fblog%2Fhow-to-filter-by-size-in-stock-on-shopify-on-the-collection-page) [Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fjoinagentready.com%2Fblog%2Fhow-to-filter-by-size-in-stock-on-shopify-on-the-collection-page)

Written by [Dylan Hunt](https://joinagentready.com/authors/dylan-hunt), Founder, AgentReady. AgentReady audits Shopify structured data and checks approved changes on the live storefront. [See plans](https://joinagentready.com/pricing).

For Shopify today

### Schema for AI

Make your Shopify catalog easier for AI to understand.

From $9/mo

[Run free audit →](https://joinagentready.com/tools/shopify-ai-readiness-checker) [Explore Schema for AI](https://joinagentready.com/features/structured-data)

Free guide

### The Shopify Functions Playbook

25 real things you can build with Functions, with the plan requirements and limits stated plainly. Emailed to you, readable immediately.

More in How-to notes

-   [Shoppers can now write reviews and add photos from your product page, without a script on first paint.](https://joinagentready.com/blog/shoppers-write-reviews-and-photos-from-product-page)
-   [How to Offer AI Shopping Readiness as a Service to Your Clients](https://joinagentready.com/blog/offer-ai-shopping-readiness-as-a-service)
-   [Rebuy Review: The Smart Cart Platform, Priced and Pulled Apart (2026)](https://joinagentready.com/blog/rebuy-review)
-   [How DTC Brands Cut Subscription Churn with Stay AI](https://joinagentready.com/blog/reduce-subscription-churn-stay-ai)

[See all in How-to notes →](https://joinagentready.com/blog/topics/how-to-guides)
