Shopify themes, liquid, logos, and UX
I want to hide the color variant from certain products. A couple of my vendors don't have different color options available but they need the Color to be set as default White in order for their sync settings to work.
I continually get questions from customers about "why is there an option for white but the clothing isn't white"
I just want to be able to hide the color variant on certain products. I have searched around a lot and the answers I found were not helpful/old/confusing 😞 I'm using the spotlight theme
Thanks kind strangers!
Can you pls share your site URL.
Thanks,
Santanu
When seeking help communicate unambiguously link directly to an url that shows an issue, don't make others dig.
Contact [email protected] for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Add css in your css file-
.product #variant-radios-template--20775397261603__main .js.product-form__input:last-child {display: none}
For dawn based themes to hide the first productOption for some products use an alternate template assigned to those products and a custom-css setting:
variant-radios fieldset:first-child { display: none; }
https://help.shopify.com/en/manual/online-store/themes/os20/theme-structure/templates#create-a-new-t... (i.e. product.hidefirstoption.json)
https://help.shopify.com/en/manual/online-store/themes/theme-structure/extend/add-css
Contact [email protected] for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Thank you for the help, this is so close! if I use your code in the variant picker's custom CSS section it removes the Size. What I want to hide is the color. I can modify the code to take away the first-child section and that'll make it all invisible but that doesn't work. I've read through some of those links you attached but I'm not seeing what that particular part of the variant picker is called so that I can specifically say THAT part is hidden. Also I apologize for not using best practices when asking for help I'll take that to heart.
Hi @willsanquil
This is Richard from PageFly - Shopify Page Builder App
Please add this code to your theme.liquid above the </head> to get this solved
Step 1: Online Stores > Themes > More Actions > Edit code
Step 2: click on theme.liquid and paste the code above the </head>
{% if product.url == '/products/cyberhuahua' %}
<style>
fieldset:has([name="Color"]) {
display: none;
}
</style>
{% endif %}
OR to hide all Color
<style>
fieldset:has([name="Color"]) {
display: none;
}
</style>
Note: change the product URL to match with your product
Hope this can help you solve the issue
Best regards,
Richard | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
All features are available from Free plan. Live Chat Support is available 24/7.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024