Mastering Shopify Variants: How to Temporarily Hide Colors and Sizes Across Your Store
Hey there, fellow Shopify store owners! I recently dove into a really helpful discussion in the Shopify community that I just had to share. It’s a common headache for many of us, especially those running made-to-order businesses: how do you temporarily hide a product variant, like a specific color or size, across multiple products without deleting it or messing up your inventory?
Leanne_Jane kicked off the conversation, explaining that with made-to-order products, tracking inventory isn't the goal. The real challenge is when a color is temporarily unavailable, and you have to go into every single product to remove it. With 10 items, 5 sizes, and 5 colors, that's 250 variants to manage! Emma_Techstudio chimed in, echoing this exact issue and highlighting the need for a solution to "disable a variant across multiple products at once."
Why You Shouldn't Delete Variants (and What to Do Instead)
First off, the community was clear: don't delete your variants! As SamanthaB2 wisely pointed out, deleting a variant isn't ideal because you're changing your core product data just for a temporary supply issue. You'd have to recreate it later, which is a waste of time and can lead to errors.
The consensus was to find ways to hide or unpublish the variant instead. This keeps your product data intact in the backend, making it super easy to reactivate when the color or size is back in stock.
Method 1: Shopify's Built-in Variant Publishing (Smarter Bulk Editing)
Initially, Vlad_Gerasimchuk suggested unpublishing a variant by going into the product, finding the variant in the "Variants" section, clicking the "Publishing" column, deselecting "Online Store," and saving. This works great for a single product, but what about those 250 variants Leanne_Jane was worried about?
This is where Ploqo came in with a brilliant refinement using the product editor's "Group by" feature. This significantly streamlines the process for individual products, and can be combined with the bulk editor for a broader impact.
Step-by-Step: Unpublishing a Color Across All Sizes for One Product
- Open the Product: Go to the specific product in your Shopify admin.
- Group Variants: Scroll down to the "Variants" section. Change the "Group by" option from "Size" (or whatever it is) to "Colour" (or your relevant option name).
- Select the Color: Now, all variants of that color (e.g., "Red" in all sizes) will appear as a single row. Tick the checkbox next to that row to select all sizes in that color.
- Manage Publishing: Click the … (three dots) button next to "Bulk edit" and choose "Manage publishing."
- Unpublish from Online Store: In the dialog box, toggle "Online Store" off.
- Save Changes: Click "Done," then "Save" on the product page. The color will disappear from your storefront for that product.
This method ensures that the entire color option, across all its sizes, is removed from the product page. Maximus3 had a good point about themes sometimes only striking out a variant if not all of its options are unpublished, but Ploqo's "Group by" approach handles this beautifully by letting you unpublish all sizes of a color at once.
Method 2: Theme-Level Hiding with Custom Liquid (Global Control)
What if you want to hide a color across all products with one single edit? This is where a more technical, theme-level solution comes into play. Devcoders and Vlad_Gerasimchuk both hinted at this, and Ploqo provided an excellent Custom Liquid snippet.
This approach involves adding a bit of code to your theme that dynamically hides specific color options. It's fantastic for global control, but it's important to note that it only hides the swatch; it doesn't prevent someone with a direct link to the variant from potentially ordering it (unpublishing, as above, does block it).
Step-by-Step: Hiding a Color Globally with Custom Liquid
- Access Theme Editor: In your Shopify admin, go to "Online Store" > "Themes." Find your current theme and click "Customize."
- Add Custom Liquid Block: Navigate to a product page. In the theme editor sidebar, under "Product information" > "Details," click "Add block" and select "Custom Liquid."
- Paste the Code: Paste the following code into the Custom Liquid block:
{% assign hidden_colours = 'Red' | split: ',' %} - Customize Colors: On the first line, change
'Red'to the exact color name(s) you want to hide. For multiple colors, use'Red, Mustard, Blue'. - Save: Save your theme changes.
This snippet not only hides the swatch but also automatically shifts the selection to an available color if the hidden one was pre-selected. Super neat!
Other Powerful Solutions: Apps and API
For those with more complex needs or a large catalog, the community also highlighted a couple of other powerful avenues:
- Shopify Apps: Easify-Jennifer suggested apps like "Easify Custom Product Options." These apps allow you to manage customer-facing options separately from your core Shopify inventory. This means you can control which choices are presented to customers in one central place, saving you from repetitive edits on individual product pages. This is a great solution if you need more robust control over your options and don't want to dive into code.
- Shopify Admin API: For the technically inclined, dragino pointed out that the Shopify Admin API (specifically API
2026-07and later) allows for variant-level publishing. Using mutations likepublishableUnpublishandpublishablePublish, developers can programmatically hide or show variants at scale. This is the most powerful and automated solution for very large stores or frequent changes, keeping inventory untouched and avoiding theme-specific hiding logic.
A Note on CSV Imports
Vlad_Gerasimchuk and buzz_buzz discussed using CSVs for bulk changes. While CSVs are fantastic for many bulk edits, they come with a caveat for variant publishing. Shopify's native product CSV generally handles publishing at the product level, not as a per-variant switch. So, you can use CSVs to help identify products with a specific color, but for the actual variant unpublishing, you're better off using the bulk editor's variant publishing column or one of the other methods discussed.
So, there you have it! Whether you prefer a built-in admin solution, a bit of theme code, a dedicated app, or a full API integration, there are solid ways to temporarily suspend variants without resorting to deletion. It all comes down to your comfort level with the tools and the scale of your operation. Happy selling!





