質問編集履歴
6
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -107,7 +107,7 @@
|
|
107
107
|
add_filter('acf/fields/google_map/api', function () {
|
108
108
|
return array(
|
109
109
|
'libraries' => 'places',
|
110
|
-
'key' => 'AIzaSyBuGtj2-
|
110
|
+
'key' => 'AIzaSyBuGtj2-fUkT7MI6XQpL********', // Googleで発行したキーを用意する
|
111
111
|
'client' => ''
|
112
112
|
);
|
113
113
|
});
|
5
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -36,14 +36,6 @@
|
|
36
36
|
Your site URL to be authorized: http://dai-ichi.net/property/detail007/
|
37
37
|
```
|
38
38
|
|
39
|
-
APIにて紐づけたURLを修正した後、少しして下記のようなエラー文章が表示されました。
|
40
|
-
```ここに言語を入力
|
41
|
-
http://*****.net/wp/wp-content/themes/*****/css/index.css
|
42
|
-
Failed to load resource:
|
43
|
-
the server responded with a status of 404 (Not Found)
|
44
|
-
```
|
45
|
-
どこかのパスが間違っているのでしょうか。
|
46
|
-
|
47
39
|
###fuctions.phpに実行したカスタム投稿タイプの内容
|
48
40
|
```ここに言語を入力
|
49
41
|
/add_action('init', 'register_post_type_and_taxonomy');
|
4
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -35,7 +35,15 @@
|
|
35
35
|
https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error
|
36
36
|
Your site URL to be authorized: http://dai-ichi.net/property/detail007/
|
37
37
|
```
|
38
|
+
|
39
|
+
APIにて紐づけたURLを修正した後、少しして下記のようなエラー文章が表示されました。
|
40
|
+
```ここに言語を入力
|
41
|
+
http://*****.net/wp/wp-content/themes/*****/css/index.css
|
42
|
+
Failed to load resource:
|
43
|
+
the server responded with a status of 404 (Not Found)
|
38
|
-
|
44
|
+
```
|
45
|
+
どこかのパスが間違っているのでしょうか。
|
46
|
+
|
39
47
|
###fuctions.phpに実行したカスタム投稿タイプの内容
|
40
48
|
```ここに言語を入力
|
41
49
|
/add_action('init', 'register_post_type_and_taxonomy');
|
@@ -104,15 +112,14 @@
|
|
104
112
|
###fuctions.phpに実行したgooglemapAPIの内容
|
105
113
|
```ここに言語を入力
|
106
114
|
//カスタムフィールドのgooglemap用
|
107
|
-
function my_acf_google_map_api( $api ){
|
108
|
-
|
109
|
-
|
115
|
+
add_filter('acf/fields/google_map/api', function () {
|
110
|
-
|
111
|
-
|
116
|
+
return array(
|
112
|
-
|
117
|
+
'libraries' => 'places',
|
118
|
+
'key' => 'AIzaSyBuGtj2-fUkT7MI6XQpL4zoCSvq8L_AxMI', // Googleで発行したキーを用意する
|
119
|
+
'client' => ''
|
120
|
+
);
|
113
|
-
}
|
121
|
+
});
|
114
122
|
|
115
|
-
add_filter('acf/fields/google_map/api', 'my_acf_google_map_api');
|
116
123
|
```
|
117
124
|
|
118
125
|
###テンプレートファイルsingle-property.phpに実行した内容
|
3
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -27,6 +27,15 @@
|
|
27
27
|
```
|
28
28
|
と、googlemapAPIのエラーが出ているようでした。
|
29
29
|
|
30
|
+
その後ご教授頂いた記事を参考にAPIを再取得しソースコードを追記したのですが、
|
31
|
+
下記のような内容のエラーが出てしまいました。
|
32
|
+
```ここに言語を入力
|
33
|
+
js?key=AIzaSyBuGtj2-fUkT7MI6XQpL4zoCSvq8L_AxMI:34
|
34
|
+
Google Maps API error: RefererNotAllowedMapError
|
35
|
+
https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error
|
36
|
+
Your site URL to be authorized: http://dai-ichi.net/property/detail007/
|
37
|
+
```
|
38
|
+
こちらは
|
30
39
|
###fuctions.phpに実行したカスタム投稿タイプの内容
|
31
40
|
```ここに言語を入力
|
32
41
|
/add_action('init', 'register_post_type_and_taxonomy');
|
2
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -18,6 +18,15 @@
|
|
18
18
|
googlemapがwebページ上で表示されません。
|
19
19
|
ダッシュボードにフィールドは作成されており、住所の入力しています。
|
20
20
|
|
21
|
+
ご指摘いただきデベロッパーツールで確認したところ以下エラーが出ました。
|
22
|
+
```ここに言語を入力
|
23
|
+
Google Maps API warning: NoApiKeys
|
24
|
+
https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
|
25
|
+
Google Maps API warning: SensorNotRequired
|
26
|
+
https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required
|
27
|
+
```
|
28
|
+
と、googlemapAPIのエラーが出ているようでした。
|
29
|
+
|
21
30
|
###fuctions.phpに実行したカスタム投稿タイプの内容
|
22
31
|
```ここに言語を入力
|
23
32
|
/add_action('init', 'register_post_type_and_taxonomy');
|
1
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -294,4 +294,6 @@
|
|
294
294
|
|
295
295
|
###補足情報(言語/FW/ツール等のバージョンなど)
|
296
296
|
WordPressバージョン 4.4.4
|
297
|
-
Advanced Custom Fieldsバージョン 4.4.7
|
297
|
+
Advanced Custom Fieldsバージョン 4.4.7
|
298
|
+
|
299
|
+
不足している情報などがあればご指摘ください。
|