質問するログイン新規登録

回答編集履歴

1

補足の追加。

2016/05/01 18:26

投稿

kei344
kei344

スコア69638

answer CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  ```PHP
4
4
  function my_scripts_method() {
5
- wp_deregister_script('jquery');
5
+ wp_deregister_script( 'jquery' );
6
- wp_enqueue_script('jquery','https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js', array(), '1.12.2');
6
+ wp_enqueue_script( 'jquery','https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js', array(), '1.12.2' );
7
- wp_enqueue_script('slick', get_template_directory_uri().'/js/slick.min.js', array('jquery'), '1.5.9', true );
7
+ wp_enqueue_script( 'slick', get_template_directory_uri().'/js/slick.min.js', array( 'jquery' ), '1.5.9', true );
8
8
  }
9
9
  ```
10
10
 
@@ -12,4 +12,12 @@
12
12
  [https://developer.wordpress.org/reference/functions/get_settings/](https://developer.wordpress.org/reference/functions/get_settings/)
13
13
 
14
14
  【get_option() | Function | WordPress Developer Resources】
15
- [https://developer.wordpress.org/reference/functions/get_option/](https://developer.wordpress.org/reference/functions/get_option/)
15
+ [https://developer.wordpress.org/reference/functions/get_option/](https://developer.wordpress.org/reference/functions/get_option/)
16
+
17
+ ---
18
+
19
+ > jQueryは <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js?ver=1.12.2"></script> との記述がhtmlの<head></head>内に出力されていました。
20
+
21
+ 修正依頼のコメントでこう書かれていたので、多分こっちは問題ありません。(目的のものが出力されているので)
22
+
23
+ また、`'1.5.9', true )` の `true` を付けるとFooterに出力されると思われます。