Top 10 WordPress hacks from June 2009

By | July 8, 2009

wordpress-hacksCats Who Code has put together an awesome list of the top 10 WordPress hacks from June 2009. The list has some hacks that I’ve never seen before on other websites, and are pretty unique and well-worth checking-out. Here’s one, and click over to see the full list of hacks:

Make your WordPress theme translatable

Using the power of .po files and this short code snippets, you can make your WordPress theme available in a wide variety of languages. This code have to be pasted in your functions.php file. The .po files should be located under your wp-content/themes/your-theme-name/languages directory.

// Make theme available for translation
// Translations can be filed in the /languages/ directory
load_theme_textdomain( 'your-theme', TEMPLATEPATH . '/languages' );

$locale = get_locale();
$locale_file = TEMPLATEPATH . "/languages/$locale.php";
if ( is_readable($locale_file) )
	require_once($locale_file);
Category: Uncategorized