Title: how to Include javascript??????
Last modified: August 20, 2016

---

# how to Include javascript??????

 *  [op1001](https://wordpress.org/support/users/op1001/)
 * (@op1001)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/how-to-include-javascript-1/)
 * Okay , I am confused, ther are so many methods and I can’t seem to find a right
   explanation ..
 * In functions.php I have the following..
 *     ```
       wp_register_script( 'info-caroufredsel', get_template_directory_uri() . '/js/jquery.carouFredSel-5.5.0-packed.js', array('jquery'), '5.5.0', true );
         wp_register_script( 'info-carousel-instance', get_template_directory_uri() . '/js/info-carousel-instance.js', array('info-caroufredsel'), '1.0', true );
   
         wp_register_script( 'jquery.flexslider', get_template_directory_uri().'/js/jquery.flexslider-min.js', array('jquery'), '1.7', true );
         wp_register_script( 'home-page-main-flex-slider', get_template_directory_uri().'/js/home-page-main-flex-slider.js', array('jquery.flexslider'), '1.0', true );
   
         wp_enqueue_script( 'info-carousel-instance' );
           wp_enqueue_script('home-page-main-flex-slider');
       ```
   
 * So two scripts are getting enqueued and two are not.
 * the question is
 * How do I call the two scripts that are not getting engueued in my theme?
 * I don’t want the scripts always loading on every page if they arent’ being used?
   you know what i mean?
 * I’ve seen so many techniques for javascript It is confusing … there doesn’t seem
   to be a standard way to do it
 * I’ve seen people add it in their headers etc etc.
    _ [Please continue in your
   existing thread if you have more questions – [http://wordpress.org/support/topic/javascript-the-proper-way?replies=2%5D](http://wordpress.org/support/topic/javascript-the-proper-way?replies=2%5D)

The topic ‘how to Include javascript??????’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [op1001](https://wordpress.org/support/users/op1001/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/how-to-include-javascript-1/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
