Skip to content

Instantly share code, notes, and snippets.

/so4985162.php Secret

Created February 13, 2011 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/717a938919cf16c5854d to your computer and use it in GitHub Desktop.
Save anonymous/717a938919cf16c5854d to your computer and use it in GitHub Desktop.
Wordpress Title Filter Modifier
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