WordPress Reference Error is not defined : Fix jQuery is not defined

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
Rate this post

WordPress Reference Error is not defined : How to Fix

jQuery is not defined is one of the most common JavaScript errors and it can make things stop working on your WordPress website. Here how it does look like in your browser console.

WordPress Reference Error is not defined : Fix jQuery is not defined

Uncaught ReferenceError: jQuery is not defined
Uncaught ReferenceError: jQuery is not defined

Common Causes:

  1. One of yours plugins’ JavaScript files are not properly loaded.
  2. Some JavaScript is running before the page is fully loaded, and as such, before jQuery is fully loaded.
  3. Your CDN-hosted jQuery might be blocked or down.

How to Fix?

Sometimes it will be too complicated to find the root of the issue, as you may not be able to find the culprit plugin, theme or the function that causes that issue. jQuery is not defined issue also could happen due to incompatibility between plugins and themes, snap! In such cases, it’ll be such a pain in the..!

Method 1

Add this line to your wp-config.php file:

jQuery is not defined

Method 2

If method 1 (which is recommended) does not work, the other way to fix this issue is by adding the jQuery library directly to your theme header.php file by following these steps:

  1. Get the latest version of jQuery Library from Google Hosted Libraries

hosted_libraries

  1. Open your theme’s header.php file
  2. Paste what you got in the first step just after the head tag.
  3. Save your file.

Conclusion:

What we discussed here is not the optimal solution for fixing jQuery is not defined issue. As we mentioned, it can be too complicated to find the exact cause of the problem, so you can consider this as a quick workaround.

(Visited 4,356 times, 5 visits today)

Nagdy

I write about Multilingual WordPress, SEO, Website Performance. Also, I like answering WordPress question on Quora. When I have the time, I run online sessions to teach WordPress for my personal FB page fans!

Hopefully you'll come back soon!
Get More Stuff
WordPress Multilingual, Performance, SEO, Reviews and HOT Deals. One email per week!
Stay Updated
Give it a try, you can unsubscribe anytime.
Close
GET MORE STUFF
IN YOUR INBOX
WordPress Multilingual, Performance, SEO, Reviews and HOT Deals. One email per week!
Stay Updated
Give it a try, you can unsubscribe anytime.
libero. luctus elit. sem, ultricies Aenean at risus ipsum leo. risus. ipsum

Pin It on Pinterest

Do you find this interesting?

Share it with your friends!