Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cuocsongso/bf5053466fed5ba0f2de08c7414eb3c2 to your computer and use it in GitHub Desktop.
Save cuocsongso/bf5053466fed5ba0f2de08c7414eb3c2 to your computer and use it in GitHub Desktop.
How to Add a Quantity Field to Shop Pages in WooCommerce by Thembay Custom CSS
.product-block.v15 .add-cart a.added+a.added_to_cart,
.product-block.v15 .add-cart a.added::after,
.product-block.v15 .add-cart a i:before{
display: none !important;
}
.product-block.v15 .add-cart a.added {
display: block !important;
}
@media (min-width: 768px) {
.product-block.v15 .group-add-cart .quantity,
.product-block.v15 .group-add-cart .add-cart{
display: inline-block;
}
.product-block.v15 .group-add-cart .quantity button,
.product-block.v15 .group-add-cart .quantity input.qty {
background: transparent;
color: #fff;
line-height: 30px !important;
}
}
@media (max-width: 767px) {
.product-block.v15 .group-add-cart .quantity input.qty {
flex: 9;
}
.product-block.v15 .group-add-cart .quantity button {
width: 40px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment