Archived topic
jQuery not defined - how does GP determine when to load jQuery?
5 replies · Started by James on July 3, 2018
From threads I've read it sounds like GP loads jQuery only when it is needed.
I'm using Seriously Simple Podcasting, which needs jQuery and it throws a console error because 'jQuery' isn't defined.
If I activate Twenty Seventeen or manually enqueue jQuery in our child theme functions, it's all good.
Is there any risk of it being included twice now that it's enqueued outside of GP?
Hi James, aside of the use of Sticky Navigation (which will be replaced soon), GP uses vanilla JavaScript. So no concerns about GP adding to the load.
Thanks David. So is wp_enqueue_scripts the right way to be including jquery in this case?
Yep :)
Legend. Thank you :)
You're welcome.