A client wanted to add the social sharing icons provided with Avada theme on the shop loop and product shortcodes as well. The social sharing icons are visible on the single product page only, so here’s how you do it!

Avada single product page: the sharing buttons

Avada: single product page social sharing WooCommerce
Avada: single product page social sharing WooCommerce

PHP snippet: add social sharing to WooCommerce product loop in Avada theme


// Add this to functions.php

function show_social_sharing () {
if (function_exists('avada_woocommerce_after_single_product_summary')) {
avada_woocommerce_after_single_product_summary();
}
}

add_action('woocommerce_after_shop_loop_item','show_social_sharing', 20);

Share:

Leave a Reply