Add Twitter Button to WP

August 12th, 2010 Blog, Tips
twitterbutton

Recently Twitter announced its own twitter share button. Now we dont need to rely on tweetmeme to share blog with twitter.
Here is how you can add it to your WP template….

Copy the below code in your index.php or single.php file in your WP theme files.

<a href="http://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink() ?>" data-text="Currently reading <?php the_title(); ?>" data-count="horizontal" data-via="ektz" >Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

Change data-via=”ektz” to your own twitter username to add your twitter link in the generated tweet.

You can also recommend another twitter account for people to follow. Please add data-related=”randomattic” just after data-via=”ektz” phrase.

say bye to tweetmeme. welcome twitter.

 

Leave a Reply





 

Testimonials

We are a small entertainment /event services company in Washington, DC and wanted a bare-bones un-cluttered "less is more" website. Ekta did a great job honoring that unusual request.

Curt Shackelford
StandUpComedyToGo.com

 
 

Our Specialties

  • New Website Design and Old Website Redesign according to newest Web Trends.
  • Website XHTML & CSS Development from scratch from custom designed PSDs.
  • WordPress as a CMS – , WP themes and Plugins modifications and creation.
  • Logo and Graphic Design for branding and advertising.

Request a Quote

Your Name (required)

Your Email (required)

Spam Filter (required)

captcha

Project Details (required)