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.
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?
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.
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.