Back to Top

Solution: Uncaught ReferenceError $ is not defined in WordPress

Uncaught ReferenceError: $ is not defined in Wordpress

As you all know, new version of WordPress (3.5) includes its own version of jQuery, which has been rigorously tested with WP and many of the most common plugins in order to provide the best compatibility and experience for WordPress users.

So When I have added my jQuery code into my theme, I got the following error

Uncaught ReferenceError: $ is not defined

I was surprised with this error generated into the console but after that I just checked jQuery by viewing source and got the solution

Keep in mind: Offloading the default jQuery and other scripts to Google is similarly disallowed. If your code doesn’t work with the built-in jQuery, it’s most likely a no conflict issue. If you can’t, we need to know why so we can fix things for everyone.


Well, there’re a few problems with jQuery code.However, the main reason I am getting jQuery issues is that I need to put jQuery no-conflict wrappers around the code

I need to add

(function($) {

to the top of code, and add this:


To the bottom. This allows the $ character to be defined as the jQuery object.

That’s it.You are done.!! 🙂

Hope this post will helpful for you, waiting for your responses.Thanks for reading and feel free to share your thoughts! Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Comments (1)

  1. Perfectly worked for me. Thankyou Bhumi

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Most Popular Posts

How to Create and Use Cookies in PHP

Posted on 2 years ago


How to use Micro Data in HTML5

Posted on 3 years ago


How to Use the HTML5 Full-Screen API

Posted on 2 years ago


Hello world

Updated 1 month ago

Nick Carter

In depth Understanding of Laravel Core

Updated 3 months ago


ECMAScript 6 New Features – 2

Updated 1 year ago


The Reader’s Poll – August 2014

Posted on 5 years ago


The Reader’s Poll – June 2014

Posted on 5 years ago


The Readers’ Poll – May 2014

Posted on 5 years ago