Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm having issues where multiple copies of jQuery are being loaded onto the page via plugins that require jQuery.

I Just want to confirm that if I have 3 plugins active on my page, that all properly use wp_enqueue_script to load jQuery, will the library be included only once or 3 times?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

If all three plugins load jQuery properly using wp_enqueue_script("jquery") then only one copy of jquery will be used.

If you are seeing three copies then some plugins are not playing nice.

share|improve this answer
2  
I'd give an extra +1 for the not playing nice comment. This is one of the biggest end-user annoyances in WordPress. –  Chip Bennett May 8 '12 at 14:59
    
+1 what Chip said. I cannot say how often I have to deal with both plugins and themes that don't load jQuery "nicely". It's unfortunate that I actually get excited when I see a theme or plugin that is doing it correctly, instead of incorrectly. –  Pippin May 8 '12 at 16:55

Your Answer

 
discard

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.