Title: Correctly enqueue scripts
Last modified: August 20, 2016

---

# Correctly enqueue scripts

 *  [keithdevon](https://wordpress.org/support/users/keithdevon/)
 * (@keithdevon)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/correctly-enqueue-scripts/)
 * In your toc.php file you have the following on line 126:
 * `add_action( 'init', array(&$this, 'init') );`
 *  This should use the wp_enqueue_scripts action, like so:
 * `add_action( 'wp_enqueue_scripts', array(&$this, 'init') );`
 * The incorrect addition of scripts was breaking properly enqueued scripts on my
   site.
 * [http://wordpress.org/extend/plugins/table-of-contents-plus/](http://wordpress.org/extend/plugins/table-of-contents-plus/)

Viewing 1 replies (of 1 total)

 *  [conjur3r](https://wordpress.org/support/users/conjur3r/)
 * (@conjur3r)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/correctly-enqueue-scripts/#post-3484478)
 * I’m only registering the scripts on init. I’m enqueueing them on wp_print_styles
   and template_redirect. Thanks for raising it, I’ll take a closer look though.

Viewing 1 replies (of 1 total)

The topic ‘Correctly enqueue scripts’ is closed to new replies.

 * ![](https://ps.w.org/table-of-contents-plus/assets/icon-256x256.png?rev=1151771)
 * [Table of Contents Plus](https://wordpress.org/plugins/table-of-contents-plus/)
 * [Support Threads](https://wordpress.org/support/plugin/table-of-contents-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/table-of-contents-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/table-of-contents-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/table-of-contents-plus/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [conjur3r](https://wordpress.org/support/users/conjur3r/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/correctly-enqueue-scripts/#post-3484478)
 * Status: not resolved