How to hide specific product variants with only one option

Can anyone tell me or help me in hiding a specific varaint option sice it only has one variant and if i delet that then the whole product gets deleted.I tried something by changing the code but it did not work. Please someone help.

Hello @yuvinater

would you like to share your store URL and password if any please.
so i can check and provide you possible solution for your question.

@yuvinater can you please share this product page link?

Here is the link and the password

Link:https://c238cd-67.myshopify.com/password

Password:1234

Here is the link and the password

Link:https://c238cd-67.myshopify.com/password

Password: 1234

You can add code by following these steps

  1. Go to Online Store → Theme → Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

#variant-radios-template--16399601729614__main .product-form__input:nth-child(3) { display: none !important; }

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

Thank you, it worked.

Hi,

If you would like to hide certain variants in your collection while displaying only the ones you prefer, I can recommend the Stamp – Variants on Collection app. With the app, you can easily split your products into their variants and choose which ones to show or hide all without using any code.