Skip to content

Instantly share code, notes, and snippets.

@glueckpress glueckpress/footer.php

Last active May 3, 2020
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 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.