Forums
Home / Plugin: WooCommerce Blocks / how to remove quantity of add to cart
(@ederflores)
1 year, 3 months ago
How do I remove the quantity part of the single product add to cart button? preferably with some css
(@doublezed2)
Hello ederflores
Thank you for contacting WooCommerce support.
Could you share a screenshot of the element you are referring to?You can use https://snipboard.io/ for making and sharing screenshots.
Once I have a visual confirmation of the element you are referring to then I can assist you further. ??
To have it like this, I did it with an addon and it came out quickly, so I imagine it can be done with CSS or by modifying the functions.php, I would like to know how to do it so I can edit the button, make it bigger, put effects, etc.
https://snipboard.io/JlWU0d.jpg
(@shameemreza)
Hi @ederflores,
To hide the quantity field for all products, you can indeed use CSS (Appearance > Customize > Additional CSS).
.single-product .single-product-wrapper .quantity { display: none; }
You can also enable the “Sold individually” under the Inventory tab. This will remove the quantity field on the front end.
Direct link: https://dsh.re/5a84e
If you’re interested in using a code snippet, I recommend following this handy guide that I discovered through a Google search: https://www.cloudways.com/blog/hide-product-quantity-field-from-woocommerce-product-pages/
I hope this helps! Please let us know how it goes or if you need further assistance.