回答編集履歴
1
追記
test
CHANGED
@@ -5,3 +5,33 @@
|
|
5
5
|
まあ「条件1に合致する群に、条件1に合致せず条件2に合致する群を結合」
|
6
6
|
|
7
7
|
みたいな感じに2回に分ける方が簡単です
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
---
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
丸ごとコードはアレなんで部品だけ
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
使うのは
|
20
|
+
|
21
|
+
[get_posts](https://developer.wordpress.org/reference/functions/get_posts/)
|
22
|
+
|
23
|
+
[setup_postdata](https://codex.wordpress.org/Function_Reference/setup_postdata)
|
24
|
+
|
25
|
+
[array_merge](https://www.php.net/manual/ja/function.array-merge.php)
|
26
|
+
|
27
|
+
あたり
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
あと
|
32
|
+
|
33
|
+
[wp_reset_postdata](https://codex.wordpress.org/Function_Reference/wp_reset_postdata)
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
それ以外の素材は質問文のコードの中にあるかと思います
|