Remove wp_title, add title-tag theme support
This commit is contained in:
@@ -6,17 +6,3 @@ function roots_excerpt_more() {
|
||||
return ' … <a href="' . get_permalink() . '">' . __('Continued', 'roots') . '</a>';
|
||||
}
|
||||
add_filter('excerpt_more', 'roots_excerpt_more');
|
||||
|
||||
/**
|
||||
* 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);
|
||||
|
||||
@@ -7,6 +7,10 @@ function roots_setup() {
|
||||
// Community translations can be found at https://github.com/roots/roots-translations
|
||||
load_theme_textdomain('roots', get_template_directory() . '/lang');
|
||||
|
||||
// Enable plugins to manage the document title
|
||||
// http://codex.wordpress.org/Function_Reference/add_theme_support#Title_Tag
|
||||
add_theme_support('title-tag');
|
||||
|
||||
// Register wp_nav_menu() menus
|
||||
// http://codex.wordpress.org/Function_Reference/register_nav_menus
|
||||
register_nav_menus(array(
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title><?php wp_title('|', true, 'right'); ?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" title="<?php echo get_bloginfo('name'); ?> Feed" href="<?php echo esc_url(get_feed_link()); ?>">
|
||||
|
||||
Reference in New Issue
Block a user