How to Add Official Tweet Button to WordPress


How Add Official Tweet Button to WordPress

It’s said that using the new official tweet button from twitter is more quicker and safer way of retweeting about your favorite stuffs on web. :) This post helps you to add the new tweet button to a self-hosted or a wordpress.com blog.

Adding Tweet Button to Self Hosted WordPress

  1. Go to Appearance menu – Editor – single.php

  2. Search for
    <?php the_content(); ?>

    and replace it with the following code

    <div style="float:right; padding-left:4px;"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="shafar">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>
    <?php the_content(); ?>

    (Replace shafar with your twitter username)

  3. Save the template.

Adding Tweet Button to WordPress.com blog

To enable the button on your wordpress.com blog, go to AppearanceExtras – and select the Show a Twitter Tweet Button on my posts option.

Tweet and Enjoy!



You May Also Like:
Fatal error: Call to undefined function get_related_posts_thumbnails() in /home/ajeet/public_html/wp-content/themes/WhosWho/single.php on line 54