Title: wp_register_style error
Last modified: August 21, 2016

---

# wp_register_style error

 *  [Kyle Gilman](https://wordpress.org/support/users/kylegilman/)
 * (@kylegilman)
 * [13 years ago](https://wordpress.org/support/topic/wp_register_style-error/)
 * When I activate the plugin I get this warning at the top of every page:
 * `wp_register_style was called incorrectly. Scripts and styles should not be registered
   or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts
   hooks.`
 * I think it’s because the plugin calls wp_register_style directly instead of inside
   of an admin_enqueue_scripts action.
 * [http://wordpress.org/extend/plugins/oauth2-provider/](http://wordpress.org/extend/plugins/oauth2-provider/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Justin](https://wordpress.org/support/users/jgwpk/)
 * (@jgwpk)
 * [13 years ago](https://wordpress.org/support/topic/wp_register_style-error/#post-3811360)
 * Thanks for reporting this Kyle. What version of WP are you using? Could you give
   a bit of information about your hosting?
 *  Thread Starter [Kyle Gilman](https://wordpress.org/support/users/kylegilman/)
 * (@kylegilman)
 * [13 years ago](https://wordpress.org/support/topic/wp_register_style-error/#post-3811382)
 * I have WP_DEBUG and PHP error reporting turned on, which is why I’m seeing those
   errors. WP_DEBUG is extremely helpful when you’re developing for WordPress.
 *  [Justin](https://wordpress.org/support/users/jgwpk/)
 * (@jgwpk)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/wp_register_style-error/#post-3811436)
 * I personally look at server logs for this information. Thans for pointing it 
   out.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘wp_register_style error’ is closed to new replies.

 * ![](https://ps.w.org/oauth2-provider/assets/icon-256x256.gif?rev=2603051)
 * [WP OAuth Server (OAuth Authentication)](https://wordpress.org/plugins/oauth2-provider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/oauth2-provider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/oauth2-provider/)
 * [Active Topics](https://wordpress.org/support/plugin/oauth2-provider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/oauth2-provider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/oauth2-provider/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Justin](https://wordpress.org/support/users/jgwpk/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/wp_register_style-error/#post-3811436)
 * Status: not resolved