-
-
Save anonymous/717a938919cf16c5854d to your computer and use it in GitHub Desktop.
Wordpress Title Filter Modifier
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
add_filter('wp_title', 'set_page_title'); | |
function set_page_title($title) { | |
global $brand; | |
// To test if the function is called! | |
global $wp_query; | |
print_r($wp_query); | |
if (is_page_template('designer.php')) | |
return 'Designer '.$brand['name'].' - '.get_bloginfo('name'); | |
else | |
return $title; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment