Global
Confirmed 163,188,236 +19,323 new today Deaths 3,383,851 +526 new today Recovered 142,621,892 Active: 17,182,493 Last updated: May 16, 2021 - 11:49 am (+05:30)
Home Coding Woocommerce – Put the ADD TO CART button below every products

Woocommerce – Put the ADD TO CART button below every products

by Admin

just add this code in to function.php

// register add to cart action

function wnc_add_cart_button () {

add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_add_to_cart', 10 );
}

add_action( 'after_setup_theme', 'wnc_add_cart_button' );
        

 

 

There is 2 way to find out Location of function.php file

1st way – WordPress dashboard

Appearance -> Theme Editor -> function.php

 

 

2nd way – file location

wp-content -> themes -> your current theme -> function.php

Related Articles

Leave a Comment

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Decline