Hi
My client asked to add share buttons on the single product page. I found this thread: https://kriesi.at/support/topic/social-share-buttons-product-page/
I added the code to my functions.php file and see the share buttons. However, I don’t get the text heading. Here’s what I have added to my functions.php file:
// add social share buttons on single product page
add_action(‘woocommerce_after_single_product_summary’, ‘avia_add_social_toolbar’, 1);
function avia_add_social_toolbar()
{
if( is_singular( ‘product’ ) ) {
$content = ‘<div class=”share_heading”>Share this Product</div>’;
$content .= avia_social_share_links(array(), false, ”, false);
$content .= ‘<div class=”hr”></div>’;
}
echo $content;
}
Did I miss something and that’s why the heading is not showing?
Thanks
Lyse
Hi
Here’s a link to a product on my website:
Lyse
Hi,
Can you elaborate on the text heading that you are expecting to see?
Best regards,
Jordan Shannon
Hi Jordan,
I was expecting to see the following heading, just before the social share buttons:
… $content = ‘<div class=”share_heading”>Share this Product</div>’;…
Thanks
Lyse
Hi,
I am able to see “Share this Product” on the page just above the social buttons. Please view the link below
Best regards,
Jordan Shannon
Hi Jordan,
I see it now. Great I was able to style the heading and the icon container.
Thank you for patience
Lyse
Hi,
I am glad this worked out for you!
Best regards,
Jordan Shannon