Notice: wp_register_style was called incorrectly.

Can you please tell me how to fix

Notice: 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. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /wp-includes/functions.php on line 3996

  • Kasia Swiderska

    Hello Mary,

    That is PHP notice - not error (or even warning) so you can actually ignore it - unless that is showing on on front end even when debug mode is off. But if want to fix it, the you need to see where those styles were called incorrectly. Right now that message tells us nothing about where those styles were add.
    If this is showing on specific page used by particular plugin, then try to disable that plugin and see if that coming from it.
    If you cannot establish that way which plugin or theme it is, then next step it to run plugin and theme "conflict" test - this way you can see, what exactly it is causing that issue.
    If its theme or plugin coming from third party services than it needs to be reported on respective support forums - fixing it on your own will be temporary and it will be gone with next update.

    Let us know what did you found about origin of those notices.

    kind regards,
    Kasia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.