• Hi,

    I’m new to WordPress and I’m using Jetpack to view social icons on the single product page and the problem is that I’m getting those icons duplicated.

    you can take a look here

    I’ve added the following snippet to functions.php to remove the duplicated icons

    function jeherve_remove_jp_woo_buttons() {
    remove_action( ‘woocommerce_share’, ‘jetpack_woocommerce_social_share_icons’, 10 );
    }
    add_action( ‘loop_start’, ‘jeherve_remove_jp_woo_buttons’ );

    and the following to custom-single-product.php to view the sharing icons underneath the product description

    if ( function_exists( ‘sharing_display’ ) ) {
    sharing_display( ”, true );
    }

    if ( class_exists( ‘Jetpack_Likes’ ) ) {
    $custom_likes = new Jetpack_Likes;
    echo $custom_likes->post_likes( ” );
    }

    is there any way to remove the sharing icons under the product tabs ?

    thanks ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Could you try to follow the first part of this tutorial to remove the default sharing buttons?
    https://jetpack.com/2013/06/10/moving-sharing-icons/

    Let me know how it goes.

    Thread Starter rasheedsamawi

    (@rasheedsamawi)

    same results here

    I’ve added the following to the functions.php file as the tutorial:

    function jptweak_remove_share() {
    remove_filter( ‘the_content’, ‘sharing_display’,19 );
    remove_filter( ‘the_excerpt’, ‘sharing_display’,19 );
    if ( class_exists( ‘Jetpack_Likes’ ) ) {
    remove_filter( ‘the_content’, array( Jetpack_Likes::init(), ‘post_likes’ ), 30, 1 );
    }
    }

    add_action( ‘loop_start’, ‘jptweak_remove_share’ );

    and the following the content-single-product.php:

    if ( function_exists( ‘sharing_display’ ) ) {
    sharing_display( ”, true );
    }

    if ( class_exists( ‘Jetpack_Likes’ ) ) {
    $custom_likes = new Jetpack_Likes;
    echo $custom_likes->post_likes( ” );
    }

    thanks

    • This reply was modified 8 years, 4 months ago by rasheedsamawi.
    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    I wonder if the buttons could be hardcoded in your theme. Could you try to switch to a different theme, like Storefront, and let me know how it goes?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Duplicated Share Icons – Single Product Page’ is closed to new replies.