Hide 'add to cart' button ONLY on woocommerce shop/category pages

前端 未结 7 715
广开言路
广开言路 2021-01-03 15:56

I want to hide the button on my shop pages, but I would like to show it on other posts and pages.

I\'ve found this code to hide the add to cart button on my whole we

7条回答
  •  臣服心动
    2021-01-03 16:42

    This could also be done with CSS by targeting the relevant classes:

    .cart{display:none;}
    
    .avia_cart_buttons{display:none;}
    

    In my case there is that avia because i use Enfold Theme. With inspect element find out your class where the buton is located. and declare it invisible.

    Another example is:

    .woocommerce .products .shop-column.product-hover-style-2 .product-content 
    .product-add-to-cart-btn{
        display:none !important;
    }
    

提交回复
热议问题