Woocommerce Product Social Sharing buttons

Dear,

My social sharing buttons are displayed between the product summary and the “select products options + add to cart button”

I feel it distracts the buying process and may not be optimal for conversions. I would like these social buttons to be displayed below the “add to cart button”.

How do I go about this?

I will include an image for clarification.

Thank you

Hello @yvescleeren,

Thanks for asking. :slight_smile:

You can use jquery .after() function to display share icons after cart button. For more information please take a look at following resource.

http://api.jquery.com/after/

If you can share website URL, may be we can give you the code that you can use. However, please note that providing custom development solutions falls outside the scope of support we offer, this is just to help you get started. In case of any issues with the code, we won’t be able to provide support.

Thanks.

kindly find the secure note

Hello There,

To resolve your issue, since the child theme is set up, please add the following code in your child theme’s functions.php file

// Add social sharing to product page
// =============================================================================
function add_social_sharing_to_product_page() {
  echo do_shortcode("[share title='Share this product' facebook='true' twitter='true' google_plus='true' pinterest='true' email='true' class='mtl']");
}
//add_action( 'woocommerce_single_product_summary', 'add_social_sharing_to_product_page', 35 );
// =============================================================================

This code will automatically add entry share right below the add to cart button.

Please let us know if this works out for you.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.