Title: [RESOLVED] Notice: wp_enqueue_script was called incorrectly.
Last modified: August 20, 2016

---

# [RESOLVED] Notice: wp_enqueue_script was called incorrectly.

 *  [Zurd](https://wordpress.org/support/users/zurd/)
 * (@zurd)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/resolved-notice-wp_enqueue_script-was-called-incorrectly/)
 * I just installed this plugin, I have debug at ON in wp-config.php and I saw this
   message :
 * > Notice: wp_enqueue_script was called incorrectly. Scripts and styles should
   > not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts,
   > or init hooks.
 * I was able to fix it by editing slimbox.php by adding this at the end:
 *     ```
       function thematic_enqueue_scripts() {
           wp_enqueue_script('jquery');
           wp_enqueue_script('jquery.slimbox', WP_PLUGIN_URL."/slimbox/javascript/jquery.slimbox.js", array('jquery'), '2.03');
           wp_enqueue_style('jquery.slimbox', WP_PLUGIN_URL."/slimbox/stylesheets/jquery.slimbox.css", false, '2.03');
       }
       add_action('wp_enqueue_scripts', 'thematic_enqueue_scripts');
       ```
   
 * I also removed the other lines at the end that we’re doing this problem.
 * [http://wordpress.org/extend/plugins/slimbox-plugin/](http://wordpress.org/extend/plugins/slimbox-plugin/)

The topic ‘[RESOLVED] Notice: wp_enqueue_script was called incorrectly.’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/slimbox-plugin.svg)
 * [Slimbox Plugin](https://wordpress.org/plugins/slimbox-plugin/)
 * [Support Threads](https://wordpress.org/support/plugin/slimbox-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/slimbox-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/slimbox-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/slimbox-plugin/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Zurd](https://wordpress.org/support/users/zurd/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/resolved-notice-wp_enqueue_script-was-called-incorrectly/)
 * Status: not resolved