Title: debug error &#8211; wp_enqueue_style was called incorrectly
Last modified: August 20, 2016

---

# debug error – wp_enqueue_style was called incorrectly

 *  [achenn](https://wordpress.org/support/users/achenn/)
 * (@achenn)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/debug-error-wp_enqueue_style-was-called-incorrectly/)
 * I’ve just uploaded a new, custom theme to find that the container is a fraction
   of the intended width, and the sections below the home section(this is one single
   page, long site utilizing ids/anchors to navigate) are no longer showing.
    I 
   turned on DEBUG to see if I could spot the problem, and after deactivating problematic
   plugins, I’m left with this error:
 * >  Notice: wp_enqueue_style was called incorrectly. Scripts and styles should
   > not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts,
   > or init hooks. Please see Debugging in WordPress for more information. (This
   > message was added in version 3.3.) in /home/achenn/public_html/frshstudio.com/
   > wp-includes/functions.php on line 2959
 * Problem is, the only thing on that particular line is:
    `trigger_error( sprintf(
   __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $
   message, $version ) );`
 * I’ve seen other [blog posts](http://www.matthewbredel.com/1673/wp-plugin-error-wp_enqueue_style-was-called-incorrectly.html)
   and forums, but the line they are telling me to search for is non-existent in
   this file, much less on the given line.
 * Any tips, ideas, etc on how to remedy this challenge are greatly appreciated.
   Thanks.

Viewing 1 replies (of 1 total)

 *  Thread Starter [achenn](https://wordpress.org/support/users/achenn/)
 * (@achenn)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/debug-error-wp_enqueue_style-was-called-incorrectly/#post-3512707)
 * After speaking with a friend, I now believe the error is somewhere in the javascript
   I’m using, but I’m not sure exactly what’s going on as I’m still very new to 
   incorporating javascript.
 * [http://pastebin.com/qfb4miXn](http://pastebin.com/qfb4miXn)

Viewing 1 replies (of 1 total)

The topic ‘debug error – wp_enqueue_style was called incorrectly’ is closed to new
replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [achenn](https://wordpress.org/support/users/achenn/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/debug-error-wp_enqueue_style-was-called-incorrectly/#post-3512707)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
