diff --git a/wp-content/themes/twentyfifteen/functions.php b/wp-content/themes/twentyfifteen/functions.php
index dccfc451e2..cc0d81639c 100644
--- a/wp-content/themes/twentyfifteen/functions.php
+++ b/wp-content/themes/twentyfifteen/functions.php
@@ -57,6 +57,14 @@ function twentyfifteen_setup() {
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
+ /*
+ * Let WordPress manage the document title.
+ * By adding theme support, we declare that this theme does not use a
+ * hard-coded
tag in the document head, and expect WordPress to
+ * provide it for us.
+ */
+ add_theme_support( 'title-tag' );
+
/*
* Enable support for Post Thumbnails on posts and pages.
*
@@ -225,38 +233,6 @@ function twentyfifteen_scripts() {
}
add_action( 'wp_enqueue_scripts', 'twentyfifteen_scripts' );
-/**
- * Filters wp_title to print a neat tag based on what is being viewed.
- *
- * @param string $title Default title text for current view.
- * @param string $sep Optional separator.
- * @return string The filtered title.
- */
-function twentyfifteen_wp_title( $title, $sep ) {
- if ( is_feed() ) {
- return $title;
- }
-
- global $page, $paged;
-
- // Add the blog name
- $title .= get_bloginfo( 'name', 'display' );
-
- // Add the blog description for the home/front page.
- $site_description = get_bloginfo( 'description', 'display' );
- if ( $site_description && ( is_home() || is_front_page() ) ) {
- $title .= " $sep $site_description";
- }
-
- // Add a page number if necessary:
- if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
- $title .= " $sep " . sprintf( __( 'Page %s', 'twentyfifteen' ), max( $paged, $page ) );
- }
-
- return $title;
-}
-add_filter( 'wp_title', 'twentyfifteen_wp_title', 10, 2 );
-
/**
* Add featured image as background image to post navs.
*
diff --git a/wp-content/themes/twentyfifteen/header.php b/wp-content/themes/twentyfifteen/header.php
index 8fbfa465da..ca8f1a5a0d 100644
--- a/wp-content/themes/twentyfifteen/header.php
+++ b/wp-content/themes/twentyfifteen/header.php
@@ -13,7 +13,6 @@
-