Remove Dropdown Menu With Only One Option

Hi,

I’m trying to remove dropdown option if there is only one option, for example:
We sell posters in horisontal or vertical style, however some posters only come in one style and then I like to remove the arrow down in the option bar.

I find solutions on this, however not for Shopify 2.0…

I’m using Prestige theme.

Thanks in advance,

Ady

Hi @Wibke_Loh ,

Please send your site and if your site is password protected, please send me the password. I will check it.

@Wibke_Loh can you send me the url of this page?

wwww.todecay.com

Example, Style only has one option: https://todecay.com/collections/posters/products/a-happy-david-poster?_pos=10&_fid=32135acb4&_ss=c

Thanks,
Andy / Wibke

www.todecay.com

Example, Style only has one option (Stående) : https://todecay.com/collections/posters/products/a-happy-david-poster?_pos=10&_fid=32135acb4&_ss=c

Thanks,
Andy / Wibke

Thanks,
Andy / Wibke

This is PageFly - Advanced Page Builder. I would love to give you some recommendations

Add this css at the bottom

Online Store->Theme->Edit code

assets->theme.css

.ProductForm__Item .Icon–select-arrow:nth-child(2){

display: none !important;

}

Best regards,

PageFly

Thanks for a quick repy, the issue is that it removes all arrow downs: I’d like to keep them where there is more than one option in the selector. Any tips on that?

All the best,

Andy / Wibke

you can try again with this code

Add this css at the bottom

Online Store->Theme->Edit code

assets->theme.css

.ProductForm__Option:nth-child(2) . ProductForm__Item svg {

display: none !important;

}

Hi again,

Unfortunately did that code not help :disappointed_face: Thanks for the help though!

Hi @Wibke_Loh ,

Please go to product-form.liquid file and add code here:

Code:

{% if option.values.size == 1 %}style="display: none;"{% endif %}

It worked beautifully THANKS!!!

1 Like