Files enqueued with '$in-footer' set to 'true' still load in the header
-
In functions.php I have many scripts enqueued like this…
wp_enqueue_script( 'flexslider' , get_template_directory_uri() . '/js/jquery.flexslider.js', array('jquery'), '1', true);
The scripts work, but Google pagespeed insights says I should load these files in the footer. I understood that setting that last parameter to ‘true’ did exactly that! But when I check the page source I see these scripts are in fact loading in the header.
Is there something wrong with the wp_enqueue_script above? Or should I look somewhere else for the solution?
- The topic ‘Files enqueued with '$in-footer' set to 'true' still load in the header’ is closed to new replies.