Remove Color Variant from Spotlight Theme

Remove Color Variant from Spotlight Theme

willsanquil
Visitor
3 0 0

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!

 

willsanquil_0-1727792958620.png

  1.  
Replies 7 (7)

SM-WEB
Shopify Partner
2 0 0

Can you pls share your site URL.

Thanks,
Santanu

SM Web Expert
willsanquil
Visitor
3 0 0
PaulNewton
Shopify Partner
7075 629 1484

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


SM-WEB
Shopify Partner
2 0 0

Add css in your css file-
.product  #variant-radios-template--20775397261603__main .js.product-form__input:last-child {display: none}

SM Web Expert

PaulNewton
Shopify Partner
7075 629 1484

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


willsanquil
Visitor
3 0 0

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.

willsanquil_0-1727818267743.png

 

PageFly-Richard
Shopify Partner
4661 1068 1725

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.