BookArc for iPad

Standard

BookArc for iPad

The BookArc for iPad is a thing of beauty. It’s gorgeous to look at and a perfect companion for the iPad. If you’re considering getting the Apple iPad dock, skip it. Get this instead. It works in portrait or landscape. It’s sturdy. It doubles as a halfpipe for pixies when turned upside down.

You need it.

Add a Tweet Button to WordPress Posts

Standard

Want to add a Twitter Tweet button to your WordPress posts? It’s super easy:

Horizontal 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="YOURUSERNAME">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

Vertical 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="YOURUSERNAME">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

Simple, 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="YOURUSERNAME">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

Customizing Output:

  • Change out data-via="YOURUSERNAME" to your your own Twitter handle.
  • The inclusion of data-text="Check out < ?php the_title(); ?> on < ?php bloginfo( 'name' ); ?>" isn’t necessary, but it’ll give you greater control over the intial text.
  • I’ve added these to my sidebar.php (and are only displayed on pages using my single.php template) but this can be customized to be included on pages, archive pages, etc.

Updates:

  • rawurlencode(get_permalink()); isn’t necessary and can actually cause the widget to report incorrectly if placed outside of the loop. Fixed code examples.