How to publish only specific product variants on Shopify

By default, Shopify will publish all variants of a product. This means that every color, size, the various combinations will automatically be published to the product page as soon as you set the product to “Active”. Unfortunately, there is no built-in option available to hide some variants from the public eyes while keeping others active until a later date. This is a problem for stores that still sell products in pre-release colors, that have seasonal drops, or that have different product inventories for different countries or regions.
We didn’t have to remove any variants, and we didn’t create any extra products. There are many ways to control the visibility of the variants, and we’ll walk through the practical inventory tricks, a bit of Liquid code, and the apps that can help.
In this post
- Why you would want to hide specific variants
- Method 1: Set inventory to zero
- Method 2: Liquid conditional rendering
- Method 3: Metafield visibility flag
- Method 4: Separate products with draft status
- What not to do
- FAQ
Why you would want to hide specific variants
Common scenarios where publishing all variants is not ideal:
- Pre-release colors. A new colorway launches next Friday but you want the product page live now with existing colors. The new color should not appear until launch day.
- Seasonal inventory. Winter-only variants (fleece-lined, insulated) should disappear from the store in summer, but you do not want to delete them because they come back every year.
- Region-specific availability. Certain variants are only sold in specific markets. Without Shopify Markets support for variant-level control, you need a workaround.
- Discontinued but not gone. A color is being phased out. You want to stop new orders but keep the variant data for existing order references and analytics.
- Sample or internal variants. Test variants, photography samples, or staff-only SKUs that should never be customer-facing.
Method 1: Set inventory to zero
Set the inventory for the variant to 0 and make sure “Continue selling when out of stock” is unchecked for the variant. The variant will still display in the picker, but show as sold out. How the sold out text is rendered will depend on the theme.
To hide the variant entirely from the picker (not just grey it out), combine this with your theme’s sold-out variant setting. Many themes have an option like “Hide out-of-stock variants” under the product page settings in the customizer.
Pros: no code required. Double bonus: once you remove the sold out product from inventory, you can then add that same product back into inventory and the variant will once again be available on the website for customers to purchase. Cons: Theme limitations. If your theme displays sold out variants, customers will still see the sold out option available to purchase, but it will be unorderable. Reports will also display incorrect information for sold out variants as they will report 0 stock.
For color swatches, the Rubik Variant Images gives you control over how sold-out swatches appear: hidden completely, greyed out with reduced opacity, or shown with a strikethrough effect. This means you can set inventory to zero and have the swatch disappear from the picker entirely.
Method 2: Liquid conditional rendering
For more control, edit your theme’s variant picker template to skip specific variants. This requires Liquid code changes but gives you exact control over which variants appear.
Make sure the code is included in your variant picker template (Dawn: snippets/product-variant-picker.liquid). If it is not, add it and it will wrap the loop in a condition to hide the variant content.
{%- for value in option.values -%}
{%- comment -%} Skip hidden variants {%- endcomment -%}
{%- assign variant_for_value = product.variants | where: 'option1', value | first -%}
{%- if variant_for_value.metafields.custom.hidden == true -%}
{%- continue -%}
{%- endif -%}
{%- comment -%} Render the variant option normally {%- endcomment -%}
<input type="radio" ... >
<label class="variant-input__label">{{ value }}</label>
{%- endfor -%}
This code checks every variant for a “hidden” metafield set to true, and skips that variant in the picker. To hide a variant, go to the product admin and click on the variant. In the metafield settings, set the “hidden” metafield to true. To show the variant again, set it back to false.
Note: You first need to define the metafield. Go to Settings > Custom data > Variants and add a definition there with the name “Hidden”, type “True/False” and key “custom.hidden”.
Method 3: Metafield visibility flag with JavaScript
If you do not want to edit Liquid templates, use JavaScript to hide variants client-side. Store the visibility flag in a metafield (same as Method 2), output it as JSON, and hide the variant options with JavaScript:
<script>
const hiddenVariants = new Set([
{%- for variant in product.variants -%}
{%- if variant.metafields.custom.hidden == true -%}
"{{ variant.option1 }}",
{%- endif -%}
{%- endfor -%}
]);
document.querySelectorAll('.variant-input__label').forEach(function(label) {
const value = label.textContent.trim();
if (hiddenVariants.has(value)) {
label.closest('.variant-input').style.display = 'none';
}
});
</script>
This is simpler to implement than Liquid changes and does not risk breaking the variant picker template. The downside: the variant options briefly flash on page load before JavaScript hides them (FOUC). For most stores this is acceptable. For a flicker-free experience, the Liquid approach (Method 2) is better.

Method 4: Separate products with draft status
For complex scenarios such as pre-release colours that have different images and descriptions for earlier release colours, the best approach is to list the new colour as a separate listing in Draft status. Then on launch day you can change it to Live status and combine with similar listings using Rubik Combined Listings.
Now your new colour has its own full product page with images and SEO metadata. Your existing products are not affected until you’re ready to launch. On the launch day of the new colour, you simply publish the new colour and add it to the combined listing group. All swatches will automatically update on the collection and product pages.
What not to do
- Do not delete variants you plan to bring back. Deleting removes the SKU, order history association, and any metafield data. When you recreate it later, it gets a new variant ID. Any analytics, reviews, or order references tied to the old variant are broken.
- Do not unpublish the entire product. If you want to hide one color out of five, unpublishing the product removes all five from the store. Use variant-level controls instead.
- Do not use “Continue selling when out of stock” as a workaround. If you set inventory to zero but leave “Continue selling” checked, customers can still buy the variant. That defeats the purpose.
“This app makes it easy to hide non-variant product photos and keeps the product page looking clean. It also helps to show clean custom swatches. Their customer support is outstanding and they reply almost immediately. They were able to fix a bug for me with minimal weight time.”
Anonymous merchant, 2026-02-18, Rubik Variant Images on the Shopify App Store
See the live demo store, watch the setup tutorial, or read the getting started guide.
Frequently asked questions
Can I hide a Shopify variant without deleting it?
Yes. Set the variant’s inventory to zero and use your theme’s “hide sold-out variants” setting. For more precise control, use a metafield visibility flag with Liquid or JavaScript to exclude specific variants from the picker.
Will hiding a variant affect SEO?
Hidden variants are still in your Shopify database but accessible by direct URL (? variant=ID). Even with Google indexing them as unavailable, it’s unlikely to harm SEO. If you want this variant to be completely invisible to search engines, see Method 2 for how to hide a variant using Liquid, where this variant will never be rendered out in HTML in the first place.
How do I schedule a variant to become visible on a specific date?
Shopify doesn’t allow variant-level scheduling. There are a few work arounds to this, such as using a metafield date field and then having a Liquid condition check the current date for display, or setting up an inventory adjustment via Shopify Flow to the target date, or even creating separate products and scheduling the publish date for those products.
Does hiding variants affect inventory reports?
If using the inventory-to-zero method, the variant will report zero stock for that particular variant. The metafield methods (Methods 2 and 3) do not affect your actual product inventory. The variant will still have the correct stock quantity, but it will not be visible on the storefront.
Can I hide variants on collection pages but show them on the product page?
Varies depending on the theme or app you’re using to display swatches on collection pages. In Rubik Combined Listings, each product in the group is displayed as a swatch on the collection page. So, if you set one of the products in the group to Draft, it will no longer appear as a swatch on the collection page, but the other products in the group will still appear on their respective product pages.