Title: Can&#039;t find variable: jQuery using shortcode on pages
Last modified: August 22, 2016

---

# Can't find variable: jQuery using shortcode on pages

 *  Resolved [reblevins](https://wordpress.org/support/users/reblevins/)
 * (@reblevins)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/cant-find-variable-jquery-using-shortcode-on-pages/)
 * I am using the shortcode with a custom template on a page and the placeholder
   text is not showing up. I am also getting this error in the console:
 * `ReferenceError: Can't find variable: jQuery`
 * Here is the page: [http://the.blevins.nl/subscribe](http://the.blevins.nl/subscribe)
 * I’m using the mqTranslate plugin. Just a note, it is showing up in a text widget
   on the front page.
 * Thanks. Hope you can help.
 * [https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/](https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Evan Herman](https://wordpress.org/support/users/eherman24/)
 * (@eherman24)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/cant-find-variable-jquery-using-shortcode-on-pages/#post-5497406)
 * Since the error code states that jQuery can’t be found, that leads me to believe
   that a) your theme is de-registering and enqueueing it’s own version of jQuery(
   which is a no-no) and it’s conflicting with the javascript included in the plugin,
   your theme isn’t loading jQuery on the page your trying to load the form on, 
   or you have another plugin installed that is conflicting with our scripts which
   are required for the plugin to function properly.
 * What theme are you using?
 * Thanks,
    Evan
 *  Plugin Author [Evan Herman](https://wordpress.org/support/users/eherman24/)
 * (@eherman24)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/cant-find-variable-jquery-using-shortcode-on-pages/#post-5497408)
 * I can see in your enqueued scripts that your theme is using mootools and not 
   jQuery, which would most likely be the problem.
 * Thanks,
    Evan
 *  Thread Starter [reblevins](https://wordpress.org/support/users/reblevins/)
 * (@reblevins)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/cant-find-variable-jquery-using-shortcode-on-pages/#post-5497415)
 * Thanks for the quick reply! So, yeah, I guess that would be the problem. I’m 
   using Rockettheme’s Vermilion. Can I just enqueue jQuery in my functions.php 
   file? Or will that cause all hell to break loose?
 *  Plugin Author [Evan Herman](https://wordpress.org/support/users/eherman24/)
 * (@eherman24)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/cant-find-variable-jquery-using-shortcode-on-pages/#post-5497420)
 * No, I would image that if you enqueue a version of jQuery on that page things
   would resolve themselves. Let us know if they do, I’d be interested in finding
   out.
 * Evan
 *  Thread Starter [reblevins](https://wordpress.org/support/users/reblevins/)
 * (@reblevins)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/cant-find-variable-jquery-using-shortcode-on-pages/#post-5497445)
 * Ok, so it looks like that worked. Haven’t tried any other javascript thingies
   like lightboxes, etc, so can’t be 100% sure of compatibility.
 * For the googlers who come across this, this is what I added to my themes functions.
   php file:
 *     ```
       //Making jQuery Google API
       function modify_jquery() {
       	if (!is_admin()) {
       		// comment out the next two lines to load the local copy of jQuery
       		wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js', false, '2.1.1');
       		wp_enqueue_script('jquery');
       	}
       }
       add_action('init', 'modify_jquery');
       ```
   
 * You could probably get fancy and check for just that page, but that’s something
   for another day. Hope it helps someone else.
 * Thanks again for the help.
 *  Plugin Author [Evan Herman](https://wordpress.org/support/users/eherman24/)
 * (@eherman24)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/cant-find-variable-jquery-using-shortcode-on-pages/#post-5497450)
 * No problem at all. I’m glad that helped you find a solution.
 * One tip, most developers recommend working with the core bundled jQuery, and 
   not enqueuing one from the Google CDN.
 * You can easily enqueue the core version of WordPress by writing `wp_enqueue_script('
   jquery' );` and it will load the one bundled with core. It will also save you
   an extra HTTP request the CDN (unless your caching).
 * Either way, glad things worked out!
 * Evan

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Can't find variable: jQuery using shortcode on pages’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/yikes-inc-easy-mailchimp-extender_a1c7e5.
   svg)
 * [Easy Forms for Mailchimp](https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/)
 * [Active Topics](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/reviews/)

## Tags

 * [jquery](https://wordpress.org/support/topic-tag/jquery/)

 * 6 replies
 * 2 participants
 * Last reply from: [Evan Herman](https://wordpress.org/support/users/eherman24/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/cant-find-variable-jquery-using-shortcode-on-pages/#post-5497450)
 * Status: resolved