You can call this lump of postings my WordPress Social shortcode series. Here is the current lineup from this post; Google +1 and Facebook Like and Send, Twitter Share button. You have come here for the Twitter Follow code and here you go. Guessing you will probably only have one of these the code is best suited for displaying one shortcode per page.
The code was built with Twitter Follow API documentation. To understand all the capabilities this shortcode supports you may what to head over and check out the types.
1) Open your Functions.php file – Create if does not exist in root of template
Assuming you have more than average knowledge and the ability to edit theme files directly in WordPress. This file serves as an entry point for your custom code in WordPress 3.0. So if you have custom classes or external code you need to run within the WordPress context you will add the hooks and init() code blocks there. The file location is ( site/wp-content/themes/YOUR-Theme/functions.php ).
2) Add the Twitter Follow Shortcode to WordPress
Double-click the code box below and copy / paste in the functions.php file.
function twitter_follow($atts, $content=null){
/* Author: Nicholas P. Iler
* URL: http://www.ilertech.com
*/
extract(shortcode_atts(array(
'show_count' => false,
'button' => 'blue', // blue, grey
'text_color' => '',
'link_color' => '',
'lang' => '', // en, fr, de, it, es, ko, ja | ref: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
'width' => '',
'align' => ''
), $atts));
$twitter_follow_code = <<<HTML
<a href="http://twitter.com/$content" class="twitter-follow-button"
data-show-count="$show_count"
data-button="$button"
data-text-color="$text_color"
data-link-color="$link_color"
data-lang="$lang"
data-width="$width"
data-align="$align">Follow @$content</a>
<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
HTML;
return $twitter_follow_code;
}
add_shortcode('tf', 'twitter_follow');
3) Add to Template Page with Shortcode
This is the most versatile way of adding the final piece of code. The shortcode.
Fastest – Use for Single Pages
<!-- Twitter Follow Shortcode -->
<?php echo do_shortcode("[tf]Nickiler[/tf]"); ?>
Usage Examples
No Count:
Follow @Nickiler
[tf]Nickiler[/tf]
Show Count:
Follow @Nickiler
[tf show_count=true]Nickiler[/tf]
Show with Grey Button
Follow @Nickiler
[tf show_count=true button='grey']Nickiler[/tf]


Hello. Can I somehow to call on your services for a fee to bring some changes to my wordpress site? Thanks in advance! All the best.
Thanks for the great tutorials. I’m having trouble getting multiple shortcodes to show up on the same line. The html in the php seems pretty trivial, but somehow they still print on separate lines. Do you have any suggestions on how to fix this? — http://www.onthemoveproductions.com/?page_id=38
Hey Nic, Funny thing is the CSS work turned out to be much more painful than putting the shortcodes together. Facebook has some in-line styles that conflict with others I found. What I did for this site was display other short codes before the Facebook shortcode and wrap them in div’s to float them to the left. Just leave the Facebook shortcode without an extra div and it should all line up correctly. Lastly, I wrapped them all into one div.
I was thinking about doing another post just for display, since I had so many problems. We’ll see !-)