WooCommerce

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' );
See our featured website design work

Check out some of the beautiful websites we’ve built for over 2,000 clients.

We offer WordPress support & maintenance

Shake the stress of ongoing maintenance with plans supported by our team of WordPress experts.

Related articles