質問編集履歴
1
ソースコードを追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -1 +1,53 @@
|
|
1
1
|
WordPressのテーマTwenty Sixteenにて記事ページのTitleタグ内にブログ名を表示させないようにしたいのですが、どの部分を編集すればいいのでしょうか。Wordpressのバージョンは4.7.3です。
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
themes>twentysixteen_childの中に以下のファイルを格納しました。
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
functions.php
|
10
|
+
|
11
|
+
```PHP
|
12
|
+
|
13
|
+
<?php
|
14
|
+
|
15
|
+
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
|
16
|
+
|
17
|
+
function theme_enqueue_styles() {
|
18
|
+
|
19
|
+
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
|
20
|
+
|
21
|
+
}
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
add_filter( 'document_title_parts', 'remove_title_description', 10, 1 );
|
26
|
+
|
27
|
+
function remove_title_description ( $title ) {
|
28
|
+
|
29
|
+
unset( $title['site'] );
|
30
|
+
|
31
|
+
return $title;
|
32
|
+
|
33
|
+
}
|
34
|
+
|
35
|
+
?>
|
36
|
+
|
37
|
+
```
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
style.css
|
42
|
+
|
43
|
+
```CSS
|
44
|
+
|
45
|
+
/*
|
46
|
+
|
47
|
+
Theme Name: Twenty Sixteen Child
|
48
|
+
|
49
|
+
Template: twentysixteen
|
50
|
+
|
51
|
+
*/
|
52
|
+
|
53
|
+
```
|