jQuery being enqueued in footer instead of head
-
Great plugin been using it for years. After upgrading to WP 5.5 I was seeing a jQuery undefined error on my login page, which was causing another plugin not to work correctly because jQuery was being enqueued in the footer instead of the header.
Current Lightbox code:
wp_enqueue_script('jquery', '', array(), false, true);
Working solution to have jQuery enqueued in the header:
Changed the $in_footer parameter to false.
wp_enqueue_script('jquery', '', array(), false, false);
I didn’t see an option in your plugin where someone could choose to load jQuery in the header or footer, but that would be a nice addition. ??
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘jQuery being enqueued in footer instead of head’ is closed to new replies.