Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have this at the bottom of my plugin file, but while I can access the plugin, I can't see any reference in the code to jquery.chained.min.js in the source:

add_action( 'wp_enqueue_scripts', 'my_plugin_enqueue' );

    function my_plugin_enqueue() {
      wp_enqueue_script( 'jquery.chained.min', plugins_url('/js/jquery.chained.min.js',__FILE__), array('jquery'));
    }

I have confirmed in the plugin folder that jquery.chained.min.js is in the js folder.

share|improve this question
1  
Are you trying to enqueue on the front or the back end? –  s_ha_dum Sep 17 '13 at 15:12
1  
Have you made sure that plugins_url( 'path/to/js', __FILE__ ) points to the correct location? And where exactly do you call add_action()? –  kaiser Sep 17 '13 at 15:55
1  
If you want script in frontend: do you have wp_head() in the template files? If in backend: you are doing it wrong. You should use admin_enqueue_scripts hook. –  G. M. Sep 17 '13 at 16:08
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.