PHP Notice: wp_enqueue_style was called incorrectly.
-
I was working with my child functions.php file trying to solve a PHP problem about the order to enqueue the parent and child styles. I had added code exactly like the code on the Codex https://codex.ww.wp.xz.cn/Child_Themes page. The warning directed me to re-read that page. I verified that my code matched. I looked at your Aaron functions.php file and saw that you already have an enqueue statement for a child theme so I deleted the one I’d put in mine to test it. My child style still worked but I still got the PHP Notice.
I am wondering if the notice is talking about the enqueue statements in Aaron’s functions.php file since I’m not enqueueing anything now. Here is the notice:
PHP Notice: wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the
wp_enqueue_scripts,admin_enqueue_scripts, orlogin_enqueue_scriptshooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /home/stcwdc57/public_html/dev.stcwdc.org/wp-includes/functions.php on line 4161
The topic ‘PHP Notice: wp_enqueue_style was called incorrectly.’ is closed to new replies.
