wordpress - Remove Add to Cart Button from MyStile Theme in Woocommerce -


i have difficulty doing after following instructions of how it. don't know if structure of woocommerce have changed since below snippet given.

below code tried using remove add cart button in homeapage , shop page.

mind you, pasted in theme functions (functions.php) , use mystile theme.

i able remove add cart button single page not homepage , shop page.

code

function remove_loop_button(){ remove_action('woocommerce_before_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10); } add_action('init', 'remove_loop_button'); 

thanks in advance.

you can use following code. put in functions.php:

remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');  remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 ); 

to remove “add cart” button need paste following lines of code in functions.php file located inside theme’s directory.

//remove "add cart" button on product listing page in woocommerce  add_action( 'woocommerce_after_shop_loop_item', 'remove_add_to_cart_buttons', 1 );  function remove_add_to_cart_buttons() {     remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' ); } 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -