回答編集履歴

1

修正

2018/12/25 08:59

投稿

KazuhiroHatano
KazuhiroHatano

スコア7804

test CHANGED
@@ -1,13 +1,19 @@
1
- ```php
2
-
3
- <?php
4
-
5
- the_post();
1
+ ~~<?php the_post();if(....かな~~
6
-
7
- if(....
8
-
9
- ```
10
2
 
11
3
 
12
4
 
5
+ 失礼、in_categoryはループ内じゃなければ
6
+
7
+ メインクエリのpostを対象にするのですね
8
+
9
+
10
+
13
-
11
+ テンプレートの切り替え条件を追加する
12
+
13
+ [template_include ](https://codex.wordpress.org/Plugin_API/Filter_Reference/template_include)でやるのがキレイなんでしょうが
14
+
15
+
16
+
17
+ in_categoryが意図通りに動いてないのか
18
+
19
+ どこまで処理がうまくいってるのかわからなければどっちみちですね