Title: wp enqueue script help!
Last modified: August 19, 2016

---

# wp enqueue script help!

 *  [heriz](https://wordpress.org/support/users/heriz/)
 * (@heriz)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/wp-enqueue-script-help/)
 * Hi,
 * I’m trying to use the wp enqueue script function to get around plugin js conflicts,
   but I’m afraid javascript doesn’t really agree with me. Can anyone help me with
   this please? I’m trying to convert this code from the Inline MP3 plugin:
 *     ```
       function setplayerscripts() {
       ?>
       <link rel="stylesheet" href="/wp-content/plugins/mp3inline/css/player.css" type="text/css" media="screen" />
       <script type="text/javascript" src="/wp-content/plugins/mp3inline/javascripts/prototype.js"></script>
       <script type="text/javascript" src="/wp-content/plugins/mp3inline/javascripts/domready.js"></script>
       <script type="text/javascript" src="/wp-content/plugins/mp3inline/javascripts/sprintf.js"></script>
       <script type="text/javascript" src="/wp-content/plugins/mp3inline/javascripts/Sound.js"></script>
       <script type="text/javascript" src="/wp-content/plugins/mp3inline/javascripts/Player.js"></script>
       <script type="text/javascript" src="/wp-content/plugins/mp3inline/javascripts/scriptaculous.js"></script>
       <?php
       }
   
       add_action('wp_head', 'setplayerscripts');
   
       ?>
       ```
   
 * In this format:
 *     ```
       wp_enqueue_script('prototype', '/wp-content/plugins/mp3inline/javascripts/prototype.js');
   
       wp_enqueue_script('domready', '/wp-content/plugins/mp3inline/javascripts/domready.js');
       ```
   
 * etc.
 * I have no idea if this is even the correct way of doing it, I’m just in dire 
   need of making Inline MP3 & NextGen work together, and it looks like this is 
   the only way…
 * As always, any help much appreciated!

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

 *  [Avram](https://wordpress.org/support/users/avram/)
 * (@avram)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/wp-enqueue-script-help/#post-1204817)
 * I’m having same problem. It just won’t work. Here’s the code I’m using:
 * `wp_enqueue_script('pagepeel', '/wp-content/plugins/page-peel/pagepeel-js.php',
   array(), false, true);`
 * Tried to hook it in _wp\_head_ and _wp\_footer_ (I’m trying to add footer script),
   but it won’t work for some reason.
 *  [serhanbuy](https://wordpress.org/support/users/serhanbuy/)
 * (@serhanbuy)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/wp-enqueue-script-help/#post-1204818)
 * Hi,
    I guess, the path of the script must be given in URL format. [http://www……&#8230](http://www……&#8230);
   Try it this way.
 *  [tengutech](https://wordpress.org/support/users/tengutech/)
 * (@tengutech)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/wp-enqueue-script-help/#post-1204832)
 * But rather than putting in a static URL you might like to use something like:
 * `wp_enqueue_script('devlounge_plugin_series', get_bloginfo('wpurl') . '/wp-content/
   plugins/devlounge-plugin-series/js/devlounge-plugin-series.js', array('prototype'),'
   0.1');`
 * Notice the ‘get_bloginfo(‘wpurl’) .’ section.
 * Code borrowed from [Using JavaScript and CSS with your WordPress Plugin](http://www.devlounge.net/articles/using-javascript-and-css-with-your-wordpress-plugin)
 * —
 * Though from other stuff I have read ‘wp_enqueue_script’ doesn’t work if you call
   it in ‘wp_head’.
 *  [satansatansatan](https://wordpress.org/support/users/satansatansatan/)
 * (@satansatansatan)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/wp-enqueue-script-help/#post-1204858)
 * so part of the solution is:
 * change
 * add_action(‘wp_head’, ‘setplayerscripts’);
 * to
 * add_action(‘init’, ‘setplayerscripts’);

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

The topic ‘wp enqueue script help!’ 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/)
 * 4 replies
 * 5 participants
 * Last reply from: [satansatansatan](https://wordpress.org/support/users/satansatansatan/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/wp-enqueue-script-help/#post-1204858)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
