WordPress.org

Ready to get started?Download WordPress

Forums

Mutiple external file (1 post)

  1. Prachalitha
    Member
    Posted 2 years ago #

    Hi All,

    Please advice me how to add multiple external js files to the "function.php" file. I tries following way but it load only the very first file,

    code: function mv_my_theme_scripts()
    {
      /* wp_enqueue_script('my-custom-script', get_template_directory_uri() . '/js/echoScript/helloAlert.js',array('jquery'));*/
    
     wp_enqueue_script('my-custom-script','http://cdn.echoenabled.com/clientapps/v2/jquery-pack.js',array('jquery')); 
    
      wp_enqueue_script('my-custom-script','http://cdn.realtidbits.com/libs/v1/comments/comments.js',array('jquery'));
    
      wp_enqueue_script('my-custom-script', get_template_directory_uri() . '/js/echoScript/sampleComment.js',array('jquery')); 
    
    }
    
    add_action('wp_enqueue_scripts','mv_my_theme_scripts');

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags