Show Your Latest Tweet In Just 5 Lines Of Code

This piece of code is just awsome as it lets you show your latest tweet with no more than 5 lines of code using the twitter search feed. Add this code to functions.php

function wp_echoTwitter($username){
include_once(ABSPATH.WPINC.'/rss.php');
$tweet = fetch_rss("http://search.twitter.com/search.atom?q=from:" . $username . "&rpp=1");
echo $tweet->items[0]['atom_content'];
}

To display latest tweet within your theme, use the below line of code, remember to replace username with your own.

<?php wp_echoTwitter('webdevplus'); ?>