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.
Month: August 2010
-
Add a Tweet Button to WordPress Posts
Want to add a Twitter Tweet button to your WordPress posts? It’s super easy:
Horizontal Button:
[php]
<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>
[/php]Vertical Button:
[php]
<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>
[/php]Simple, No-Count Button:
[php]
<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>
[/php]Customizing Output:
- Change out
data-via="cdharrison"
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.
- Change out