WordPress のプラグインが出力するjQueryの設定と、内で直接記述したのjQueryの設定が重複し、コードに不具合を起こしてしまうことがある。そうしたjQueryの重複読込を防ぐためには、以下のコードをfunction.phpに記述する。 //重複がないよう最適化したjQuery設定を出力 add_action('wp_head', 'myScript', 1); function myScript() { wp_enqueue_script('jquery'); } そうするとから、<?php wp_head(); ?> から、最適化されたjQueryの<script>の設定が出力されるようになる。 Related posts:WordPress バージョン情報を隠してセキュリティを高める