回答編集履歴
1
情報の追加。
answer
CHANGED
@@ -2,4 +2,40 @@
|
|
2
2
|
// $sql = "SELECT sum(volume) FROM mtraffics;
|
3
3
|
// ↑「"」が無い
|
4
4
|
$sql = "SELECT sum(volume) FROM mtraffics";
|
5
|
-
```
|
5
|
+
```
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
---
|
12
|
+
|
13
|
+
**追記:**
|
14
|
+
|
15
|
+
jQuery を2重で呼び出しても多分失敗するはず。また読み込みたいjsがどこに配置されているかはわかりませんが、フルパスで記述する必要があります。
|
16
|
+
|
17
|
+
|
18
|
+
```PHP
|
19
|
+
wp_enqueue_script( 'circliful', get_template_directory_uri().'/js/jquery.circliful.js', array( 'jquery' ), '20161226', true ); // 最後の「true 」は wp_footer 部分にスクリプトを読み込む指定
|
20
|
+
```
|
21
|
+
|
22
|
+
(以下参考)
|
23
|
+
|
24
|
+
【WordPress で jQuery を使う時の注意点 | EastCoder;】
|
25
|
+
[http://eastcoder.com/2014/07/using-jquery-with-wordpress/comment-page-1/](http://eastcoder.com/2014/07/using-jquery-with-wordpress/comment-page-1/)
|
26
|
+
|
27
|
+
【wordpressでjqueryを使う時の推奨方法まとめ】
|
28
|
+
[http://kiyotatsu.com/web44/](http://kiyotatsu.com/web44/)
|
29
|
+
|
30
|
+
【get_stylesheet_directory_uri:WordPress私的マニュアル】
|
31
|
+
[http://elearn.jp/wpman/function/get_stylesheet_directory_uri.html](http://elearn.jp/wpman/function/get_stylesheet_directory_uri.html)
|
32
|
+
|
33
|
+
【WordPress » Javascriptファイルをロードする | MORILOG】
|
34
|
+
[http://morilog.com/wordpress/js/wp_enqueue_script/](http://morilog.com/wordpress/js/wp_enqueue_script/)
|
35
|
+
|
36
|
+
【functions.phpでJSやCSSを一元管理する| WordPressテックラボ | [Smart]】
|
37
|
+
[http://rfs.jp/sb/wordpress/wp-lab/wp_enqueue_script.html](http://rfs.jp/sb/wordpress/wp-lab/wp_enqueue_script.html)
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
|