wp_enqueue_script error in debug mode
-
When debugging my site I am getting an error
Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or init hooks.
After reviewing the feature-me plugin, I determined the error is coming from line 51 in the init.php file.
I made the following change on my copy:
////wp_enqueue_script(‘jquery’);function add_public_scripts() {
wp_enqueue_script(‘jquery’);
}
add_action(‘wp_enqueue_scripts’,’add_public_scripts’);Thanks
Mark
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘wp_enqueue_script error in debug mode’ is closed to new replies.