Hide variant by category.

Hide variant by category.

I have one product with 6 size variants.

Example: Denim Pants

Sizes:

36

38

40

42

20

22

This product is listed in two different categories: Adult and Kids.

In the Adult category, I only want to show 4 out of the 6 sizes:

36

38

40

42

And in the Kids category, I want to show the same product but only 2 out of the 6 sizes:

22

20

Is there a way to hide some sizes in the Kids category but keep them active in the Adult category?

Yeah, this is so doable. Either with a little liquid or to make things easy and quick adding a little css to either of adult or kids category to hide/display sizes accordingly.