Add Email This Article Option to Your WordPress Posts

Have you seen a site that gives you an option to email the article to your friend. If you have read a newspaper online, then you have. WordPress has a similar feature for the posts. You can add it by simply enabling a plugin called Email This. Once you have installed and updated the settings to your desire, simiply add this code in your single.php inside the loop. 1 This code will put a printer icon / link to every post...

Display Most Recent Tweet in WordPress

Twitter is getting very famous among bloggers. Many bloggers are now displaying their most recent tweet on their blog. If you want to display your most recent tweet on your blog simply place this code where you want to display it in your WordPress theme. 01 02 $username = “TwitterUsername”; // Your twitter username. 03 $prefix = “”; // Prefix some text you want displayed before your latest tweet. 04 $suffix = “”; // Suffix some text you want display after your latest tweet. 05 $feed = “http://search.twitter.com/search.atom?q=from:” . $username . “&rpp=1”; 06 07 function parse_feed($feed) { 08 $stepOne = explode(““, $feed); 09 $stepTwo = explode(“ “, $stepOne[1]); 10 $tweet = $stepTwo[0]; 11 $tweet = str_replace(“12 $tweet = str_replace(“>”, “>”, $tweet); 13 return $tweet; 14 } 15 16 $twitterFeed = file_get_contents($feed); 17 echo stripslashes($prefix) . parse_feed($twitterFeed) . stripslashes($suffix); 18 ?> e Make sure to change the username in the first...