[Plugin: Contact Form 7] Javascript error with “Footer Javascript” is fixable
-
When I installed the “Footer Javascript” plugin, I noticed that I received javascript errors because the contact-form-7.js file was loading in the header, while the jquery.js file was loading in the footer.
One fix is to change the contact-form-7.php file like this:
- On line 1153, comment out (or remove) the <script> tag that includes the javascript.
- On line 1162, inside the load_js function, change the wp_enqueue_script call to look like this:
wp_enqueue_script('contact-form-7', WPCF7_PLUGIN_URL . '/contact-form-7.js', array('jquery', 'jquery-form'));
which will add the javascript to the queue, and require that jquery and jquery-form are loaded as well.
Hope this helps somebody, and it would be great if it could be incorporated into the next official release.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘[Plugin: Contact Form 7] Javascript error with “Footer Javascript” is fixable’ is closed to new replies.