Support » Plugins » How can I get Contact Form 7 to not load jQuery

  • Hi everybody, I recently started using Contact Form 7. I love it, but I don’t like how it always loads jQuery.

    I’m already loading the latest, minified version of jQuery earlier in my page. I wish I could just tell CF7 to use this jQuery, instead of loading a different (older, unminified) version.

    CF7 does offer the ability to not load ALL scripts –

    But that’s not what I need. I just need it to not load jQuery. Maybe in a future version there would be a WPCF7_LOAD_JQUERY flag too?

    thanks for any help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • I guess you’re misunderstanding.

    • The current WordPress 3.3.1 bundles jQuery 1.7.1 (latest).
    • The bundled jQuery is already minified.
    • Contact Form 7 just loads the bundled jQuery.

    So you need nothing to do.

    Loading JavaScript and Stylesheet Only When it is Necessary

    Thank you for your clarification, you’re right that CF7 is loading the minified version.

    I guess my question now is – how do I get jQuery to run earlier in the page loading process. I was loading it manually, this resulted in 2 versions of jQuery being loaded.

    Sounds like, instead I need to add an enqueue_script statement in the my head? And then CF7 will realize it already got loaded, and not reload it?

    thanks again for the help, cheers

    So you don’t need to load jQuery manually. Bundled jQuery is loaded automatically when necessary.

    WordPress loads scripts with the following function:


    In case of jQuery, it would be this:

    This loads the built in jQuery bundled with WordPress. If there are two calls to this same function (such as you call it in head, or at init, and then CF7 calls it wherever it is loaded), the second time it will check whether it’s already loaded, and if yes, just does nothing.

    Also, when you call jQuery, you are using the function, right?

    Also, for your reference: wp_enqueue_script

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How can I get Contact Form 7 to not load jQuery’ is closed to new replies.