質問編集履歴

5

キャプチャ変更

2019/03/25 00:24

投稿

tassi
tassi

スコア10

test CHANGED
File without changes
test CHANGED
@@ -144,4 +144,4 @@
144
144
 
145
145
 
146
146
 
147
- ![![Advanced Custom Fields](e7f362a61209e22368a1ab8c05709bbd.png)](e1f4008abd6d30ddd64f993beb619d6c.png)
147
+ ![Advanced Custom Fields](82be4f2edb7491e88043cbf1f6b05058.png)

4

キャプチャ追加

2019/03/25 00:24

投稿

tassi
tassi

スコア10

test CHANGED
File without changes
test CHANGED
@@ -36,17 +36,17 @@
36
36
 
37
37
 
38
38
 
39
+ ### 補足情報
40
+
41
+
42
+
39
- ### 補足情報(FW/ツールのバージョンなど
43
+ #### ツールのバージョンなど
40
44
 
41
45
 
42
46
 
43
47
  - WordPress 5.1.1
44
48
 
45
49
  - Advanced Custom Fields 5.7.12
46
-
47
-
48
-
49
- ### コード
50
50
 
51
51
 
52
52
 
@@ -137,3 +137,11 @@
137
137
  add_action( 'init', 'add_taxonomy' );
138
138
 
139
139
  ```
140
+
141
+
142
+
143
+ #### カスタムフィールドグループ設定画面のスクリーンショット
144
+
145
+
146
+
147
+ ![![Advanced Custom Fields](e7f362a61209e22368a1ab8c05709bbd.png)](e1f4008abd6d30ddd64f993beb619d6c.png)

3

コードを追加

2019/03/25 00:18

投稿

tassi
tassi

スコア10

test CHANGED
File without changes
test CHANGED
@@ -43,3 +43,97 @@
43
43
  - WordPress 5.1.1
44
44
 
45
45
  - Advanced Custom Fields 5.7.12
46
+
47
+
48
+
49
+ ### コード
50
+
51
+
52
+
53
+ #### カスタム投稿タイプを追加しているコード
54
+
55
+
56
+
57
+ ```PHP
58
+
59
+ //カスタム投稿タイプ追加
60
+
61
+ function add_custom_post() {
62
+
63
+ register_post_type(
64
+
65
+ 'request',
66
+
67
+ array(
68
+
69
+ 'label' => 'タイトル',
70
+
71
+ 'public' => true,
72
+
73
+ 'has_archive' => true,
74
+
75
+ 'menu_position' => 5,
76
+
77
+ 'supports' => array(
78
+
79
+ 'title',
80
+
81
+ 'editor',
82
+
83
+ 'custom-fields',
84
+
85
+ 'rewrite' => array('with_front' => false)
86
+
87
+ )
88
+
89
+ )
90
+
91
+ );
92
+
93
+ }
94
+
95
+ add_action('init', 'add_custom_post');
96
+
97
+
98
+
99
+ function add_taxonomy() {
100
+
101
+ //カテゴリ
102
+
103
+ register_taxonomy(
104
+
105
+ 'request-cat',
106
+
107
+ 'request',
108
+
109
+ array(
110
+
111
+ 'label' => 'カテゴリ',
112
+
113
+ 'singular_label' => 'カテゴリ',
114
+
115
+ 'labels' => array(
116
+
117
+ 'all_items' => 'カテゴリ一覧',
118
+
119
+ 'add_new_item' => 'カテゴリを追加'
120
+
121
+ ),
122
+
123
+ 'public' => true,
124
+
125
+ 'show_ui' => true,
126
+
127
+ 'show_in_nav_menus' => true,
128
+
129
+ 'hierarchical' => true
130
+
131
+ )
132
+
133
+ );
134
+
135
+ }
136
+
137
+ add_action( 'init', 'add_taxonomy' );
138
+
139
+ ```

2

発生している問題の追加

2019/03/22 11:39

投稿

tassi
tassi

スコア10

test CHANGED
File without changes
test CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  カスタム投稿タイプには Advanced Custom Fields で作ったカスタムフィールドを表示させているのですが、投稿者アカウントでログインするとカスタムフィールドが表示されません。
14
14
 
15
- 管理者アカウントでは正しく表示されています。
15
+ 管理者、寄稿者、編集者では正しく表示されています。
16
16
 
17
17
 
18
18
 

1

試したことの追加

2019/03/20 13:37

投稿

tassi
tassi

スコア10

test CHANGED
File without changes
test CHANGED
@@ -28,6 +28,8 @@
28
28
 
29
29
  - プラグイン「User Role Editor」をインストールし、試しにフィールドグループの全権限を付与した
30
30
 
31
+ - 「Advanced Custom Fields」以外のプラグインをすべて停止してみた
32
+
31
33
 
32
34
 
33
35
  いずれも効果は見られずカスタムフィールドは表示されないままです。