Support » Plugins and Hacks » Jetpack by WordPress.com » Jetpack & WooCommerce puts Sharing buttons above content

Jetpack & WooCommerce puts Sharing buttons above content

Viewing 4 replies - 1 through 4 (of 4 total)
  • I added some text to the description of the category just to see if it was going to be put into the same div.

    And Yes the text I put in my Category Description is in the same div that Jetpack is putting it’s sharing button.

    All of this is being hooked in automatically by a WooCommerce Category and then JetPacks Sharing which should hooking in after the content.

    Plugin Author Jeremy Herve


    While I’m not familiar with Woocommerce, it’s possible that they’ve added the_content() inside their .term-description div to allow shop owners to easily add a description for each product.

    Since Jetpack’s sharing module hooks into the_content and the_excerpt, it gets added everywhere where the tags are used.

    You should be able to move the sharing buttons to a different location thanks to that tutorial:

    Another alternative would be to find the conditional tag returning true on category product pages (it seems to be is_product_category() according to the documentation), and remove the sharing buttons only on these pages, like so:

    function jptweak_remove_share() {
        if ( is_product_category() ) {
            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' );

    You can find out more about Jetpack’s sharing buttons and how to customize them here:

    Let me know if it helps.

    So this would be more a WooCommerce bug then anything to do with Jetpack?

    I try to fix it on my own site. But I’d also like to report the bug as well…

    Plugin Author Jeremy Herve


    I’m not sure that’s a bug. I can imagine that some people might want to add sharing buttons or other things there. That’s also not specific to Jetpack: If you were to use another sharing plugin or any plugin hooking into the_content(), the same thing would happen on your category product pages.

    Woocommerce seems to use the_content() intentionally:

    You could get in touch with the plugin developers if you think that should be removed from the category product pages.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Jetpack & WooCommerce puts Sharing buttons above content’ is closed to new replies.
Skip to toolbar