Title: enqueue script issue
Last modified: August 19, 2016

---

# enqueue script issue

 *  [lerizzle](https://wordpress.org/support/users/lerizzle/)
 * (@lerizzle)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/enqueue-script-issue/)
 * I have this in my head:
 *     ```
       add_action('wp_head', 'add_scripts');
       wp_head();
       ```
   
 * and in functions I have this
 *     ```
       function add_scripts() {
       	wp_register_script('superfish', get_bloginfo('template_directory').'/js/superfish.js', array('jquery'));
       	wp_register_script('slideshow', get_bloginfo('template_directory').'/js/jquery.cycle.lite.min.js', array('jquery'));
          wp_enqueue_script('my_scripts', get_bloginfo('template_directory').'/js/js.js', array('jquery', 'superfish', 'slideshow'));
       }
       ```
   
 * But my scripts won’t print? please help

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/enqueue-script-issue/#post-1797372)
 * [http://codex.wordpress.org/Function_Reference/wp_enqueue_script](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)
 *  Thread Starter [lerizzle](https://wordpress.org/support/users/lerizzle/)
 * (@lerizzle)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/enqueue-script-issue/#post-1797380)
 * Thanks Esmi. I see you posted the same on someone elses question but I had read
   that too (i do look at docs before posting ;). After some digging I found that
   it’s an issue with putting the script with the init_head action as oppose to 
   init. Is that correct?
 *  [Reuben](https://wordpress.org/support/users/greuben/)
 * (@greuben)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/enqueue-script-issue/#post-1797382)
 * This will work…
 *     ```
       function add_scripts() {
       if( !is_admin(){
       wp_register_script('superfish', get_bloginfo('template_directory').'/js/superfish.js', array('jquery'));
       wp_register_script('slideshow', get_bloginfo('template_directory').'/js/jquery.cycle.lite.min.js', array('jquery'));
       wp_enqueue_script('my_scripts', get_bloginfo('template_directory').'/js/js.js', array('jquery', 'superfish', 'slideshow'));
       }
       }
       add_action('init', 'add_scripts');
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘enqueue script issue’ is closed to new replies.

## Tags

 * [wp_enqueue_script](https://wordpress.org/support/topic-tag/wp_enqueue_script/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [Reuben](https://wordpress.org/support/users/greuben/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/enqueue-script-issue/#post-1797382)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
