WordPress.org

Forums

Jetpack by WordPress.com
[resolved] How to revert Twitter sharing behaviors to previous version of Jetpack (11 posts)

  1. mjvito
    Member
    Posted 1 year ago #

    Hi-

    I liked the streamlined implementation of the Twitter button in previous Jetpack versions. I don't want to append "@jetpack" (or any other handle) to the tweet. I don't want the Jetpack sharing advertisement after the tweet is submitted. I want the popup window to close by itself.

    I'm not a dev, but am OK with tinkering in functions.php, plugins, etc. If anyone can help me get pointed in the right direction, would be much appreciated!

    https://wordpress.org/plugins/jetpack/

  2. mjvito
    Member
    Posted 1 year ago #

  3. julianthebrecklandview.com
    Member
    Posted 1 year ago #

    I too have the same issue - it also means its posting twice to my FB time line when I put my on handle on it. http://www.thebrecklandview.com

    This really should be an option

  4. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    You can replace "@jetpack" by your own Twitter account by going to Settings > Sharing in your dashboard, and filling in the "Twitter Site Tag" option at the bottom of the page.

    I hope this helps.

  5. julianthebrecklandview.com
    Member
    Posted 1 year ago #

    Thanks Jeremy,
    I already did that and I would make two points why that is not a good way out.
    I tweet every article when I post it using my account so adding via @brecklandview at the end is pointless since that is the account tweeting!
    Secondly, for SEO reasons I like each article post url to be the headline which means long post URLs so adding via @brecklandview (which is also a link to Twitter) eats away 20 odd chars from my 160 chars.
    This impacts so badly for me, I am considering disabling the feature :(
    Please see if it can be disabled and make me happy :)

  6. mjvito
    Member
    Posted 1 year ago #

    Thanks for taking a look Jeremy. (btw, minor kinks aside, I love the work you do with Jetpack!)

    Because we don't to append any twitter handle, which isn't a UI option, the Twitter Site Tag field doesn't resolve the need. I was able to find a code tweak that works for the moment. I just added the filter that used to be what people inserted to add their own Twitter handle, but loaded an empty string into my variable:

    /* Filter Jetpack Twitter Card Site Tag */
    
    function my_jetpack_twitter_cards_site_tag( $tag ) {
        $tag = '';
    
        return $tag;
    }
    add_filter( 'jetpack_twitter_cards_site_tag', 'my_jetpack_twitter_cards_site_tag' );
  7. julianthebrecklandview.com
    Member
    Posted 1 year ago #

    I see the latest update no longer adds the via @jetpack if the Twitter handle in settings is blank.
    Thank you for that :)
    What a brilliant team.

  8. mjvito
    Member
    Posted 1 year ago #

    Yes, just saw it a moment ago. Thank you!

  9. lilacsun
    Member
    Posted 1 year ago #

    Thank you so much! Really appreciate this. :D

  10. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    @mjvito That's a good solution, yep!

    However, this won't work if you've connected your Twitter account to Publicize. In this case, Jetpack automatically uses that twitter account in the "via" field, even if you didn't fill in a Twitter site tag under Settings > Sharing in your dashboard.

    If you want to make that there won't be any "via" mention added to the sharing buttons, I would suggest using the jetpack_sharing_twitter_via filter, like so:

    add_filter( 'jetpack_sharing_twitter_via', '__return_empty_string', 11 );

  11. mjvito
    Member
    Posted 1 year ago #

    Perfect. Even simpler! Thanks a bunch Jeremy.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Jetpack by WordPress.com
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic