回答編集履歴
1
追記
test
CHANGED
@@ -23,3 +23,31 @@
|
|
23
23
|
|
24
24
|
|
25
25
|
[条件分岐タグ](https://wpdocs.osdn.jp/%E6%9D%A1%E4%BB%B6%E5%88%86%E5%B2%90%E3%82%BF%E3%82%B0) 参照
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
----
|
30
|
+
|
31
|
+
(追記 2018.07.13 13:47)
|
32
|
+
|
33
|
+
コメント欄では、インデントがつかなかったので、解答欄にも追記。 fit_recent_widget_registration を以下のように書き換えて
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
```
|
38
|
+
|
39
|
+
function fit_recent_widget_registration() {
|
40
|
+
|
41
|
+
if ( is_single() ){
|
42
|
+
|
43
|
+
unregister_widget('wp_widget_recent_posts');
|
44
|
+
|
45
|
+
register_widget('fit_recent_posts_widget');
|
46
|
+
|
47
|
+
}
|
48
|
+
|
49
|
+
}
|
50
|
+
|
51
|
+
```
|
52
|
+
|
53
|
+
で、どうでしょうか?
|