function wpb_adding_scripts() { wp_register_script('my-amazing-script', get_template_directory_uri() . '/js/my-amazing-script.js','','1.1', true); wp_enqueue_script('my-amazing-script'); } add_action( 'wp_enqueue_scripts', 'wpb_adding_scripts' );