Add wp_title() filter

This commit is contained in:
Ben Word
2013-03-17 18:56:23 -05:00
parent c3e7861705
commit 9fc2eb7f2f
2 changed files with 17 additions and 3 deletions

View File

@@ -80,6 +80,20 @@ function roots_language_attributes() {
}
add_filter('language_attributes', 'roots_language_attributes');
/**
* Manage output of wp_title()
*/
function roots_wp_title($title) {
if (is_feed()) {
return $title;
}
$title .= get_bloginfo('name');
return $title;
}
add_filter('wp_title', 'roots_wp_title', 10);
/**
* Clean up output of stylesheet <link> tags
*/

View File

@@ -5,7 +5,7 @@
<!--[if gt IE 8]><!--> <html class="no-js" <?php language_attributes(); ?>> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title><?php wp_title(''); ?></title>
<title><?php wp_title('|', true, 'right'); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php wp_head(); ?>