Created
May 30, 2014 08:53
-
-
Save geoffreycrofte/e372a1a047024cd9e023 to your computer and use it in GitHub Desktop.
Translation for a WordPress Child Theme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
CHILD THEME functions.php file | |
*/ | |
if ( !function_exists('child_localization')) { | |
function child_localization() { | |
load_child_theme_textdomain('child_text_domain', get_stylesheet_directory() . '/lang'); | |
} | |
add_action('after_setup_theme', 'child_localization'); | |
} | |
// useful debug tool : http://marketpress.com/product/debug-translations/ | |
// thank you @jennybeaumont ;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
PARENT THEME functions.php file | |
*/ | |
if ( !function_exists('parent_localization')) { | |
function parent_localization() { | |
load_theme_textdomain('parent_text_domain', get_template_directory() . '/languages'); | |
} | |
add_action('after_setup_theme', 'parent_localization'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment