Home / Forums / WoodMart support forum / How to disable add to cart
Home › Forums › WoodMart support forum › How to disable add to cart
How to disable add to cart
- This topic has 5 replies, 2 voices, and was last updated 8 months ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
November 26, 2025 at 3:21 pm #697795
pudelisParticipantHi, we have some categories products wich has price, but we dont want to let clients to buy them.
https://woocommerce-1526781-5928971.cloudwaysapps.com/kategorija/audiniai/uzsakomieji/On single product layout we figure out, but how about archive page? there are still button add to cart if we add prices.
Attachments:
You must be logged in to view attached files.November 27, 2025 at 8:43 am #697904Hello,
Try to add the following custom css code in Theme Settings > Custom CSS:
body.term-uzsakomieji .add_to_cart_button, body.term-uzsakomieji .product_type_simple, body.term-uzsakomieji .product_type_variable, body.term-uzsakomieji a.button { display: none !important; }Best Regards,
November 27, 2025 at 11:41 am #697928
pudelisParticipantHow to add also in this category and subcategories?
https://woocommerce-1526781-5928971.cloudwaysapps.com/kategorija/romanetes/November 27, 2025 at 2:50 pm #697995Hello,
To apply the same rule to multiple categories and their subcategories, you just need to target all the category slugs in the body class.
For example, for this category:
“Romanetes”, You can use this:
body.term-romanetes .add_to_cart_button, body.term-romanetes .product_type_simple, body.term-romanetes .product_type_variable, body.term-romanetes a.button { display: none !important; }Best Regards,
November 27, 2025 at 2:56 pm #697998
pudelisParticipantSo later we can add any term to this css with subcategories also?
For example by same logic?body.term- .add_to_cart_button,
body.term-mechanizmas-uzuolaida-sirma .product_type_simple,
body.term-mechanizmas-uzuolaida-sirma .product_type_variable,
body.term-mechanizmas-uzuolaida-sirma a.button {
display: none !important;
}November 27, 2025 at 3:35 pm #698009Hello,
Yes, exactly — you can add any category or subcategory slug the same way.
Just copy the block and replace the slug:
body.term-mechanizmas-uzuolaida-sirma .add_to_cart_button, body.term-mechanizmas-uzuolaida-sirma .product_type_simple, body.term-mechanizmas-uzuolaida-sirma .product_type_variable, body.term-mechanizmas-uzuolaida-sirma a.button { display: none !important; }Best Regards,
-
AuthorPosts
- You must be logged in to create new topics. Login / Register