WP functions.php に 1 つの js ファイルを追加することができましたが、これは正常に機能します。別のものを追加するにはどうすればよいですか? たとえば、classie.js を add_my_script 関数に追加しますか? get_template_directory_uri() を複製しようとしましたが、これはうまくいきませんでした - 答えが私を見つめているように感じます!
add_action( 'wp_enqueue_scripts', 'add_my_script' );
function add_my_script() {
wp_enqueue_script(
'slicknav',// name your script so that you can attach other scripts and de-register, etc.
get_template_directory_uri() . '/js/jquery.slicknav.min.js', // this is the location of your script file
array('jquery') // this array lists the scripts upon which your script depends
);
}