First, don’t put script tags directly in template files, enqueue them from your theme/child theme’s functions.php
. Second, use the API to output URIs for scripts, don’t hardcode or use relative paths.
function wpdocs_theme_name_scripts() {
wp_enqueue_script(
'flexslider',
get_template_directory_uri() . '/js/jquery.flexslider.js',
array('jquery'),
null,
true
);
wp_enqueue_script(
'fancyselect',
get_template_directory_uri() . '/js/fancySelect.js',
array('jquery'),
null,
true
);
wp_enqueue_script(
'myscript',
get_template_directory_uri() . '/js/script.js',
array('jquery'),
null,
true
);
}
add_action( 'wp_enqueue_scripts', 'wpdocs_theme_name_scripts' );