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.

  • 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. – gmazzap Sep 17 '13 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.