How to Remove Add to Cart Button on WooCommerce Category Pages

Share This Post

Share on facebook
Share on linkedin
Share on twitter
Share on email

Go to your file manager at server side.

Click on the following folders in file manager:

public_html > wp-content > plugins > woocommerce

Double click on woocommerce.php to edit

Scroll all the way to the end of the editor and click on the empty line.

Copy and paste the following code:

 add_action( 'woocommerce_after_shop_loop_item', 'remove_add_to_cart_buttons', 1 );

    function remove_add_to_cart_buttons() {
      if( is_product_category() || is_shop()) { 
        remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' );
      }
    }

More To Explore

Author

Leave a Reply

Your email address will not be published.

×

Hello!

Click one of our representatives below to chat on WhatsApp or send us an email to adaleow@runaway.com.sg

× How can I help you?