All Collections
FAQ's and Troubleshooting
How to add "Add to Cart" button in Divi shop pages
How to add "Add to Cart" button in Divi shop pages

You can easily add the "Add to Cart" button in your Divi shop pages.

Cristi avatar
Written by Cristi
Updated over a week ago

Note: We highly recommend creating a child theme when you are editing theme template files. You can learn about creating a child theme in here.
You might notice that your products in the shop pages created with the shop module don't have a "Add to Cart" button, if you want to add that, all you need is to add this code in the functions.php file of the child theme.

// Add "Add to Cart" buttons in Divi shop pages
add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 20 );

Alternatively, if you don't want to use a child theme, you can install and activate the following Code Snippets plugin and open the WordPress Dashboard > Snippets > Add New option and add a title to the code and Codes under PHP codes and click on the Save changes and Activate button from the bottom left.


Note: Just so you know, we can't promise support for any third-party plugins regarding compatibility or can't take liability for any security concerns.

Did this answer your question?