Global
Confirmed 113,544,338 +10,920 new today Deaths 2,519,255 +911 new today Recovered 89,129,051 Active: 21,896,032 Last updated: February 26, 2021 - 9:51 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