When enqueue-ing a jQuery containing javascript script into the function.php file, what is the connection between the script name and the file containing the jQuery script? Is the script name just a made up name or does it take from the file name or the script contained within the referenced file? Thanks for the help.


function exp_script() {
wp_enqueue_script( 'script_name', get_template_directory_uri() . '/js/script_file.js', array( 'jquery' ), '1.0.0', true );

add_action( 'wp_enqueue_scripts', 'exp_script' );

Read more here: WordPress enqueue – what’s the connection between script name and script file?


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: