Skip to content

Instantly share code, notes, and snippets.

@glueckpress glueckpress/footer.php
Last active Dec 14, 2015

What would you like to do?
[WordPress] Offer filterable text strings in WordPress themes and child themes. Makes it easy to adjust original text, fully translatable. Example footer.php borrowed from _s (underscores) starter theme by @Automattic.
* Your _s child theme functions.php.
* For sake of example only. Remember _s is made for hacking, not for child themes.
function _s_child_theme_setup() {
load_child_theme_textdomain( '_s-child-theme', get_stylesheet_directory( . '/languages' );
add_action( 'after_setup_theme', '_s_child_theme_setup' );
* Filter text from footer.php
function _s_child_theme_template_footer_text( $strings ) {
$strings[1] = sprintf(
__( 'Super-proudly powered by %s', '_s' ),
__( 'WordPress and the good gods of the internet.', '_s-child-theme' )
return $strings;
add_filter( '_s_template_footer_text_strings', '_s_child_theme_template_footer_text', 2 );
You can’t perform that action at this time.