How to get rid of a variant showing on product page

Solved

How to get rid of a variant showing on product page

Nadine10
Excursionist
52 0 7

Hi,

 

How do I get rid of the material variant showing on my product page? 

I still want it to function on the collection page and as a filter, but just hide it showing on the product page.

 

Thanks

Nadine10_0-1714053647292.png

 

 

Accepted Solution (1)
theycallmemakka
Shopify Partner
1673 400 419

This is an accepted solution.

Hi @Nadine10 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code just above tag </body>

{% if product %}
<style>
.product-form__inner [name="options[Material]"],
.product-form__inner  .product-form__option:has([name="options[Material]"]) {
    display: none!important;
}
</style>
{% endif %}

 

If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!

 

Best Regards,
Makka

Support Me: Buy me a Coffee


For quick response - Message Me


Ping me at: theycallmemakka@gmail.com

View solution in original post

Replies 3 (3)

theycallmemakka
Shopify Partner
1673 400 419

Hi @Nadine10 ,

 

Can you provide link to the store? I will review the product page and let you know if its possible to remove that with CSS

Support Me: Buy me a Coffee


For quick response - Message Me


Ping me at: theycallmemakka@gmail.com

theycallmemakka
Shopify Partner
1673 400 419

This is an accepted solution.

Hi @Nadine10 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code just above tag </body>

{% if product %}
<style>
.product-form__inner [name="options[Material]"],
.product-form__inner  .product-form__option:has([name="options[Material]"]) {
    display: none!important;
}
</style>
{% endif %}

 

If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!

 

Best Regards,
Makka

Support Me: Buy me a Coffee


For quick response - Message Me


Ping me at: theycallmemakka@gmail.com

Nadine10
Excursionist
52 0 7

I've been trying to get this fixed for weeks, thanks so much. This works great!!!!