Posted: February 3rd, 2009 | Author: Barrie Adams | Filed under: Wordpress Hacks | Tags: code snippet, wordpress, wordpress code, Wordpress Hacks, wordpress how to | No Comments »
This allows you to theme/style and control the currently selected menu tab in CSS by adding a class=”current” on it.
If Home, or Category, or Archive, or Search or Single page is selected, class=”current” will be included in
If category with category slug of css or showcase, class=”current” is added.
Posted: February 3rd, 2009 | Author: Barrie Adams | Filed under: Wordpress Hacks | Tags: code snippet, wordpress, wordpress code, Wordpress Hacks, wordpress how to | No Comments »

// Your twitter username.
$username = "TwitterUsername";
// Prefix - some text you want displayed before your latest tweet.
// (HTML is OK, but be sure to escape quotes with backslashes: for example href="link.html")
$prefix = "";
// Suffix - some text you want display after your latest tweet. (Same rules as the prefix.)
$suffix = "";
$feed = "http://search.twitter.com/search.atom?q=from:" . $username . "&rpp=1";
function parse_feed($feed) {
$stepOne = explode("", $feed);
$stepTwo = explode("", $stepOne[1]);
$tweet = $stepTwo[0];
$tweet = str_replace(”<”, “<”, $tweet);
$tweet = str_replace(”>”, “>”, $tweet);
return $tweet;
}
$twitterFeed = file_get_contents($feed);
echo stripslashes($prefix) . parse_feed($twitterFeed) . stripslashes($suffix);
?>
Posted: February 3rd, 2009 | Author: Barrie Adams | Filed under: Wordpress Hacks | Tags: code snippet, wordpress, wordpress code, Wordpress Hacks, wordpress how to | No Comments »

wp_rss('http://wpforums.com/external.php?type=RSS2', 5); ?>
Posted: February 3rd, 2009 | Author: Barrie Adams | Filed under: Wordpress Hacks | Tags: code snippet, wordpress, wordpress code, Wordpress Hacks, wordpress how to | No Comments »
Replace is_home with the page you want it to only appear on.
Posted: February 3rd, 2009 | Author: Barrie Adams | Filed under: Wordpress Hacks | Tags: code snippet, wordpress, wordpress code, Wordpress Hacks, wordpress how to | No Comments »

} elseif (is_404()) {
echo '404 Not Found';
} elseif (is_category()) {
echo 'Category:'; wp_title('');
} elseif (is_search()) {
echo 'Search Results';
} elseif ( is_day() || is_month() || is_year() ) {
echo 'Archives:'; wp_title('');
} else {
echo wp_title('');
}
?>