WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I see that on every page Wordpress is loading in jquery, how do I go about using that jquery as it keeps telling me that it doesn't recognize $ or $noConflict(); - I'm trying to add some jquery under wp_head().

share|improve this question
You could start by checking the Codex: codex.wordpress.org/Function_Reference/… – s_ha_dum Jul 29 '13 at 17:08
up vote 2 down vote accepted

The jQuery object is jQuery rather than $. See noConflict wrappers in wp_enqueue_script for some examples.

jQuery(document).ready(function($) {
    // Inside of this function, $() will work as an alias for jQuery()
    // and other libraries also using $ will not be accessible under this shortcut
share|improve this answer
I can't make $ universal? I have to keep wrapping my custom JS around the alias. – Howdy_McGee Jul 29 '13 at 17:47
you could reassign it via $ = jQuery;, but you'll only introduce potential conflicts, and as you can see from the example above you only need to reference jQuery for the ready function and pass the $ as argument, where you can freely use $ within. – Milo Jul 29 '13 at 18:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.