Need help? Check out our Support site, then


Twitter follow button

  1. I am trying to add the twitter follow button using the text widget. I have tried the method at the following link, but it does not seems to be the correct way :

    http://en.support.wordpress.com/twitter/twitter-follow-button/

    I also tried adding the button using the twitter html, provided at :
    https://twitter.com/about/resources/buttons#follow

    The html they provided is :

    <a href="https://twitter.com/jasminder21" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @jasminder21</a>
    <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>

    The second one seems to be fine, but it is not having any CSS. It just displays the simple text, without any CSS.

    How can i add the twitter follow button then ?

    The blog I need help with is dotnetfreakblog.wordpress.com.

  2. Hi,

    Shortcodes (the [twitter-follow screen_name='wordpressdotcom'] style of code) won't execute in widgets, only posts/pages, which is why it isn't working for you.

    The second, Twitter provided code, isn't working as expected since script elements aren't supported on WordPress.com out of security concerns.

    My first suggestion would be to use the Twitter Timeline Widget ( http://en.support.wordpress.com/widgets/twitter-timeline-widget/#twitter-timeline-widget ).

    Another alternative would be to add an image widget with a Twitter icon that you choose.

    I wish I had the dead on answer for you, but hope one of those solutions is workable.

    Cheers!

  3. Hey kraftbj, thanks for your reply.

    Could you please confirm that the "Shortcodes " style will not work even if i paste them into my post ?

    If it can work, can what settings i have to make as it did not seemed to work in my case, when i tried inside the blog post, rather then a widget...

  4. Hi,

    Shortcodes will work in pages and posts. They will not work in a text widget.

    I just tried [twitter-follow screen_name='wordpressdotcom'] in a test post of mine and worked without issue. All you need to set is your twitter name within single quotes (replacing wordpressdotcom).

    Cheers!

  5. I'm going to back myself up a bit. The shortcode is working for me in a text widget (generally, short codes don't, but I misunderstood on this one apparently).

    One thing to be sure of is that you're using straight quotes like ' ' and not "curly" quotes that are sometimes rendered.

  6. Thanks kraftbj...

    I added the "Text" widget with the short code of the follow button...it worked...

    Thanks once again.

Topic Closed

This topic has been closed to new replies.

About this Topic