Hi @ralph001,
The icons should be added at the top/bottom of the post.
Regardless of the type of post.
If it is not working, then it must be something with the theme doing something wrong.
The plugin uses the_content
filter and inserts the icons.
May be the theme is not using product content at all and displaying something else.
Please share the page URL too.
Thanks,
Aakash
Thread Starter
Ralph
(@ralph001)
Hi Vaakash,
thank you for the prompt response,
The icons should be added at the top/bottom of the post.
Regardless of the type of post.
Yes, this is working. The plugin adds the social share buttons on the top and bottom.
The plugin uses the_content
filter and inserts the icons.
May be the theme is not using product content at all and displaying something else.
I am trying to get the social share to show up in the middle of the post within the post content without using a shortcode (if I use the shortcode then I have to add it to each post individually which would take a lot of time since there are hundreds of posts).
The post type is a product using WooCommerce and I want the social share to show below the WooCommerce meta data instead of at the end of the page.
https://www.businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/
the link above shows the WooCommerce visual hooks and I want to get the share bar to show up at the woocommerce_share
hook.
Please share the page URL too.
I currently can’t share the link.
I am using the Divi Theme and the site is still under construction.
Thread Starter
Ralph
(@ralph001)
To make it even more clear,
The below code if added to the functions.php works.
But on the post page it is returning the shortcode in text format instead of the actual share bar.
add_action( 'woocommerce_share', 'add_content_after_share_func' );
/*
* share bar shortcode
*/
function add_content_after_share_func() {
// Echo content.
echo '<div> [wpsr_share_icons template="1"] </div>';
}
Thread Starter
Ralph
(@ralph001)
Ok I used the do_shortcode and it worked perfectly.
add_action( 'woocommerce_share', 'add_content_after_share_func' );
/*
* share bar shortcode
*/
function add_content_after_share_func() {
// Echo content.
echo do_shortcode('[wpsr_share_icons template="1"]');
}