Adding An Add To Cart Button On Divi Catalog Pages

In order to add an ‘Add To Cart’ button on any/all Divi Catalog Pages, we found an amazing page with a pretty awesome Function.

Here’s the page: jonathanbossenger.com/adding-the-cart-button-to-your-divi-shop-pages.

And here’s the code:

// register add to cart action
function dac_add_cart_button () {
add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_add_to_cart', 10 );
add_action( 'after_setup_theme', 'dac_add_cart_button' );

Need help?

Tell us about your project!

This field is for validation purposes and should be left unchanged.

Related articles