WordPressのテーマTwenty Sixteenにて記事ページのTitleタグ内にブログ名を表示させないようにしたいのですが、どの部分を編集すればいいのでしょうか。Wordpressのバージョンは4.7.3です。
themes>twentysixteen_childの中に以下のファイルを格納しました。
functions.php
PHP
1<?php 2 add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); 3 function theme_enqueue_styles() { 4 wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); 5 } 6 7 add_filter( 'document_title_parts', 'remove_title_description', 10, 1 ); 8 function remove_title_description ( $title ) { 9 unset( $title['site'] ); 10 return $title; 11 } 12?>
style.css
CSS
1/* 2 Theme Name: Twenty Sixteen Child 3 Template: twentysixteen 4*/