• Home
  • Services
  • Facebook
  • Privacy Policy

TricksDaddy

  • Home
  • Services
  • Facebook
  • Privacy Policy

How To Add Official Twitter Share Count (Tweet) Button To Thesis WordPress Theme

Twitter has officially released the twitter tweet buttons for its users. Most of the users already started using these buttons now. In my last post I shared a tutorial to add official tweet buttons to WordPress blogs. Now I’m going to share a tutorial for adding a tweet button to thesis WordPress theme.

How To Add Tweet Button To Thesis

  1. First copy the following code and replace tricksdaddy with your own twitter user name.
    function offical_tweet_btn() {if (is_single()){ ?>
    <div style="float:right; padding:4px;">
    <a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="tricksdaddy">Tweet</a>
    <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
    </div>
    <?php }}
    add_action('thesis_hook_before_post', 'offical_tweet_btn');
  2. Now navigate to your custom_functions.php file and paste the code there.
    Note: Take a backup of your custom_functions.php file before making any changes to it.
  3. Now save your custom_functions.php file and refresh your blog. You will see new official tweet button on your blog.

Customization

If you want the button to appear on left hand side then simply replace float:right with float:left

Twitter tweet button is available in following three styles:

Official Twitter Tweet Button Thesis Theme

You can have any of the following styles on your blog. If you want to show your button in horizontal or no count style, then simply replace vertical with horizontal for horizontal style button and none for no count button.

If you are not using thesis, you can get thesis now.

Share On
 Previous Article How To Add Official Twitter Share Count (Tweet) Button To WordPress
Next Article   What Types of Marketing Can Social Media Replace?

11 Comments

  1. Diana Freedman
    August 13, 2010 at 7:03 pm

    Hello! Thanks for your post. What if you also want the button to appear on each of the posts displayed on the homepage in addition to each single post?

    Thanks!
    Diana
    @dianafreedman

    • Simrandeep
      August 14, 2010 at 12:10 am

      If you want the button to appear on homepage also then you can use the following code:

      function offical_tweet_btn() {
      ?>
      <div style="float:right; padding:4px;">
      <a href="http://twitter.com/share&quot; class="twitter-share-button" data-count="vertical" data-via="tricksdaddy">Tweet</a>
      <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script&gt;
      </div>
      <?php
      }
      add_action(‘thesis_hook_before_post’, ‘offical_tweet_btn’);

  2. Dev @ Best WordPress Themes
    August 15, 2010 at 10:42 am

    Hey Simrandeep,

    Great post. Very Useful.
    Thanks for sharing the code. Keep up the good work.

  3. sonmanutd
    August 15, 2010 at 4:21 pm

    Great post and useful
    You’re good at thesis customizing. I tried and don’t know anything.

  4. George Serradinho
    August 16, 2010 at 10:36 am

    I’m using the tweetmeme button on my blog, but I’m using a function. I find it better to use a function than install another plugin. You have made this very easy for others to do the same and that’s cool.

    You could modify the code to not work on category pages as well.

    • Simrandeep
      August 16, 2010 at 11:56 am

      You are right George, its not a good idea to use another plugin to add just a single Retweet button. Its better to use function for such purpose.

      BTW thanks for the suggestion George. I’ll modify it as suggested by you.

      Cheers 🙂

  5. Iphone 4 Jailbreak
    August 17, 2010 at 11:28 am

    I saw this new release in the WP latest plugins bar , yet to use it. But most of my readers are facebook users , and not twitter users . So u have to see if its worthy of using it .

  6. esoftload
    August 20, 2010 at 2:45 am

    great tip for thesis users….

  7. Mike
    August 23, 2010 at 3:31 am

    Great article, very straightforward and easy to understand.

    Works perfectly, thanks very much 🙂

  8. Mohammed Fouzan @ Geek world
    January 11, 2011 at 6:12 pm

    Great post. Very Useful.
    Thanks for sharing the code. Keep up the good work.

  9. Pingback: Tweets that mention How To Add Official Twitter Share Count (Tweet) Button To Thesis WordPress Theme -- Topsy.com
© Copyright. Theme by BloomPixel.