Add Official Tweet Button in WordPress

Add Official Tweet Button in WordPress

Posted in: WordPress- Nov 03, 2010 2 Comments

Adding a decent looking tweet button to your wordpress post or page is a really good marketing tool. In this post we will explore a simple way to add official tweet button in WordPress.

Resulting button could be one of the three listed in this image depending upon your choice.
twitter buttons

Step 1:

Visit the URL : http://twitter.com/goodies/tweetbutton and choose the button of your choice.

Step 2:

Copy the given code to your code editor and customize it using WordPress functions.

Example:

<a href="http://twitter.com/share"
   class="twitter-share-button"
   data-url="<?php the_permalink(); ?>"
   data-text="<?php the_title(); ?>"
   data-count="horizontal"
   data-via="<?php bloginfo('name'); ?>">Tweet</a>

<script type="text/javascript"
src="http://platform.twitter.com/widgets.js"></script>

Any questions are welcome :)

I hope you have enjoyed the post !

image by latatisabel

2 Responses

  1. comment writer
    jacinto says:

    nice! thanks for shared :)

  2. comment writer
    CodeMyConcept says:

    A very instructive article

    Thank you very much!

Trackbacks