What the heck is going on, you ask? Say hello to Tersus.

Bare bones? You got it. Tersus is an achingly simple WordPress theme without all the usual cruft.

Super Ginormous

This is the personal site/blog/experiment of Chris Harrison, a web designer living, working and playing in Augusta, GA.

|

08.12.2010

Add a Tweet Button to WordPress Posts

Want to add a Twit­ter Tweet but­ton to your Word­Press posts? It’s super easy:

Hor­i­zon­tal Button:

<a href="http://twitter.com/share" class="twitter-share-button" data-url="<?php echo get_permalink(); ?>" data-count="horizontal" data-text="Check out <?php the_title(); ?> on < ?php bloginfo( 'name' ); ?>" data-via="cdharrison">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

Ver­ti­cal Button:

<a href="http://twitter.com/share" class="twitter-share-button" data-url="<?php echo get_permalink(); ?>" data-count="vertical" data-text="Check out <?php the_title(); ?> on < ?php bloginfo( 'name' ); ?>" data-via="cdharrison">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

Sim­ple, No-Count Button:

<a href="http://twitter.com/share" class="twitter-share-button" data-url="<?php echo get_permalink(); ?>" data-count="none" data-text="Check out <?php the_title(); ?> on < ?php bloginfo( 'name' ); ?>" data-via="cdharrison">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

Cus­tomiz­ing Output:

Updates:

This item was posted by Chris Harrison.

Categories:

You can follow comments on this item via the RSS 2.0feed.

Comments are closed.

3 comments on “Add a Tweet Button to WordPress Posts”

  1. Posted by Ben on Thursday, August 12th, 2010.

    Awe­some, Chris. I was look­ing for a tut just for this.

  2. Posted by Cliff on Friday, August 13th, 2010.

    Thanks, Chris!