回答編集履歴
2
補足の追加。
test
CHANGED
@@ -3,3 +3,35 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
関数にまとめ物とは別に init用の関数を用意されてはいかがでしょう。
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
---
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
**追記:**
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
こういうことです。
|
18
|
+
|
19
|
+
```PHP
|
20
|
+
|
21
|
+
function init_createPostType() {
|
22
|
+
|
23
|
+
createPostType( 'お客様情報1', 'customer1' );
|
24
|
+
|
25
|
+
createPostType( 'お客様情報2', 'customer2' );
|
26
|
+
|
27
|
+
createPostType( 'お客様情報3', 'customer3' );
|
28
|
+
|
29
|
+
createPostType( 'お客様情報4', 'customer4' );
|
30
|
+
|
31
|
+
createPostType( 'お客様情報5', 'customer5' );
|
32
|
+
|
33
|
+
}
|
34
|
+
|
35
|
+
add_action( 'init', 'init_createPostType' );
|
36
|
+
|
37
|
+
```
|
1
読みやすく修正。
test
CHANGED
@@ -2,4 +2,4 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
関数にまとめ
|
5
|
+
関数にまとめ物とは別に init用の関数を用意されてはいかがでしょう。
|