WordPress Reference Error is not defined : Fix jQuery is not defined
WordPress Reference Error is not defined : How to Fix
- 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..!
Add this line to your wp-config.php file:
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:
- Get the latest version of jQuery Library from Google Hosted Libraries
- Open your theme’s header.php file
- Paste what you got in the first step just after the head tag.
- Save your file.
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.
Leave a Comment
You must be logged in to post a comment.