i have multiple javascript file. How can i add those to wordpress by wp_register_script ? I can add single javascript file by
function wptuts_scripts_with_jquery() {
wp_register_script( 'custom-script', get_template_directory_uri() . '/js/custom-script.js', array( 'jquery' ) );
// For either a plugin or a theme, you can then enqueue the script:
wp_enqueue_script( 'custom-script' );
}
add_action( 'wp_enqueue_scripts', 'wptuts_scripts_with_jquery' );
wp_register_scriptandwp_enqueue_scriptfor each script you want to add.