Twitter counter not displaying

Viewing 6 posts - 1 through 6 (of 6 total)
  • #22623
    Seb
    Participant

    Hi,
    First of all, thank you VERY much for this fantastic theme.
    Just one little problem with the sharing buttons. They all display well (Facebook, Twitter and Google+) but there is no counter displayed for Twitter ? How can I fix this ?

    Thank you very much.

    #22624
    Daniel Tara
    Keymaster

    The code that generates the tweet button is outdated and you’ll have to manually update it if you want it to display properly.

    In functions.php find this block of code:

    <a href="<?php echo esc_url( 'https://twitter.com/share' ); ?>" class="twitter-share-button" data-url="<?php the_permalink(); ?>">Tweet</a>
    <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

    Replace it with this:

    <a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink(); ?>" data-show-count="true">Tweet</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
    #22625
    Seb
    Participant

    Thank you very much for your support and your very quick answer.
    I changed the code but it doesn’t seem to work πŸ™

    For example : http://photographika.fr/star-wars-celebration/

    Still no Twitter counter πŸ™

    #22626
    Daniel Tara
    Keymaster

    The code is correct. What’s happening is that Twitter discontinued the tweet count feature for the tweet button as they have announced in a blog post last year. Nothing we can do about it I’m afraid.

    Later Edit: A service called OpenShareCount claims to integrate with the Twitter button and retrieve share counts. I haven’t tried it so can’t confirm it’s accuracy. They require you to sign up for an account with them.

    • This reply was modified 8 years, 1 month ago by Daniel Tara.
    #22629
    Seb
    Participant

    Thank you very much for the tip.
    I am trying Opensharecount and it seems to work. πŸ˜‰
    Just one more question (and everything will be perfect for me with Pinboard Theme) : could you please tell me how to add space between the Twitter button and the G+ button ? As you can see here for example, they are very close compared to the FB button : http://photographika.fr/comment-photographier-le-lapin/

    Thanks again for taking time improving my blog. Your help is warmly welcomed.

    #22632
    Daniel Tara
    Keymaster

    There’s the CSS code I recommend to style that section:

    .social-bookmarks > div + div {
        margin-left: 30px;
    }
    
    .facebook-like {
        width: auto;
    }
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.