Archived topic
ReferenceError: jQuery is not defined on some pages
3 replies · Started by Kim on April 19, 2020
Hey there,
I'm using a plugin to create responsive carousels on the site I'm working on. I've created one and used the shortcode to implement it on the homepage and this works fine.
However, when I try to use it on any other page the slider doesn't show.
I checked the javascript console and I'm getting two 'Uncaught ReferenceError: jQuery is not defined' errors.
Having had a look around online it looks like it's to do with when jQuery loads. On the network tab in Dev Tools I can see that jQuery loads before anything else on the homepage, but this isn't the case on the other page?
Unfortunately I'm building this site locally (not sure if this might be part of the problem...) so I cannot share any live links, but I'm happy to send over screenshots if you need me to.
Many thanks!
Hi there,
I believe this is the issue:
https://generatepress.com/forums/topic/jquery-installation/#post-897958
Let me know if this helps :)
Hey Leo,
Thanks for getting back to me.
It looks as though jQuery is already installed though, as the script does run on both pages. It's just that the script doesn't run first like it does on the homepage?
Here's a screenshot of the network tab when loading on a secondary page:

Many thanks!
I would recommend disabling all plugins to eliminate any conflicts first.
GP itself cannot cause issues like this.