Last active
August 29, 2015 14:03
-
-
Save rhyswynne/4f12c447ba1f9d9303cf to your computer and use it in GitHub Desktop.
Example functions.php file. This removes the <title> tag and replaces it with the word "Hello!" - Don't run it on a live site!
This file contains 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 | |
// This file is loaded as well as the parent's (twentythirteen) child theme, so name your functions with a prefix. Like below:- | |
function twentythirteen_child_title( $title, $sep ) { | |
return "Hello!"; | |
} | |
// This function is hooked in after the theme is set up. It removes the default title and replaces it with the word "Hello!". Don't run on a live site! | |
function twentythirteen_child_change_title() { | |
remove_filter( 'wp_title', 'twentythirteen_wp_title' ); | |
add_filter( 'wp_title', 'twentythirteen_child_title', 10, 2 ); | |
} | |
add_action( 'after_setup_theme', 'twentythirteen_child_change_title' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment