Let’s see how to Add javacscript file in function.php file.
Code
function my_scripts() {
wp_register_script( 'custom-script', get_template_directory_uri() . '/jquery.js' );
wp_enqueue_script( 'custom-script' );
}
add_action( 'wp_enqueue_scripts', 'my_scripts' );
Total Views: 1,318