WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
[resolved] Cannot hide automatic insertion of Sharing buttons (4 posts)

  1. lowlight
    Member
    Posted 9 months ago #

    As per instructions in another thread, I used this code in my functions.php to remove the automatic insertion of sharing buttons

    function jptweak_remove_share() {
    	remove_filter( 'the_content', 'sharing_display',19 );
    	remove_filter( 'the_excerpt', 'sharing_display',19 );
    }
    add_action( 'loop_end', 'jptweak_remove_share' );

    However due to a recent update of either Jetpack or WP, the automatic insertion is back, in addition to my manual insertion.

    How can I remove it again?

    http://wordpress.org/plugins/jetpack/

  2. gerzok
    Member
    Posted 9 months ago #

    I have the same problem! :/

  3. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 9 months ago #

    Hi, thanks for letting us know. We're aware of this problem and looking into it. I'll let you know once I have some news.

  4. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 7 months ago #

    We found the issue, and we updated the blog post accordingly: you will now need to use the following code to remove sharing buttons and Likes from the bottom of your posts:

    function jptweak_remove_share() {
        remove_filter( 'the_content', 'sharing_display',19 );
        remove_filter( 'the_excerpt', 'sharing_display',19 );
        remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 );
    }
    
    add_action( 'loop_start', 'jptweak_remove_share' );

Reply

You must log in to post.

About this Plugin

About this Topic