Two jquery files
-
I load jquery 3 as part of my theme so figured I don’t need two jquery files loading on the page.
I used the filter detailed in the docs to remove the Contact Form 7 js:add_filter( 'wpcf7_load_js', '__return_false' );
then I manually added the plugin script file in the same position on the page where it would load via the plugin:
$url = plugins_url('contact-form-7/includes/js/scripts.js?ver=5.0.2'); echo "<script type='text/javascript' src='$url'></script>";
Unfortunately the form submission seems to brake, I assume the code in the plugin doesn’t work with jquery 3.
Is it possible to use this plugin with the latest jquery? If not I will just abandon the idea of preventing the old jquery file from loading.
- The topic ‘Two jquery files’ is closed to new replies.