Hiding Variants that arent needed to be selected

Topic summary

A Shopify store owner using the Symmetry 6.0.3 theme needed to hide the color variant selector on product pages when only one color option exists, while keeping size selection visible. The color variant must remain in the backend for filtering purposes but shouldn’t require customer selection when there’s only one choice.

Solution provided:

  • Add custom JavaScript code to the theme.liquid file, placed above the </body> tag
  • The code automatically hides variant selectors that contain only a single option
  • This preserves the variant data for filtering while improving the user experience

Status: Resolved. The solution was implemented successfully and confirmed working by the original poster.

Summarized with AI on November 2. AI used: claude-sonnet-4-5-20250929.

Hello : )

We are having problems with our variants showing when we don’t want them to. We currently enter an items colour and size as variants when listing items. This has lead to people having to select the colour option even when there is only one. The attached picture is an example of this.

As you can see we need to let the customer select the right size but dont need them to select the colour. Is it possible to hide the colour variant without deleting it from the listing (because we use it for filter system). There doesn’t seem to be any option to hide this in the theme editor but i was hoping it could be edited in the theme code?

The theme is Symmetry 6.0.3

Thanks :wink:

Hey @SourcedBySab1

Welcome to Shopify Community! Can you share your Store URL so I can have a look on it? Also, if you have password enabled then please share the password as well. Your cooperation would be greatly appreciated.

Best Regards,
Moeed

1 Like

@SourcedBySab1 Hope you are doing well.

Please share your store URL so, can check and guide you accordingly.

https://sourcedbysab.com/

This is the URL. I am unsure what you mean by giving you the store password. Thank you for the speedy response and sorry for my slow one!

1 Like

https://sourcedbysab.com/

This is the URL. Thank you for the speedy response and sorry for my slow one!

Hey @SourcedBySab1

Follow these Steps:

  1. Go to Online Store

  2. Edit Code

  3. Find theme.liquid file

  4. Add the following code in the bottom of the file above tag


RESULT:

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

1 Like

Thank you very much !!! :grin:

Thank you for your reply. I’m glad to hear that the solution worked well for you. If you require any more help, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated.