I'm trying to streamline my WordPress installation and have noticed that Contact Form 7 places 2 JavaScript calls in the footer of each page.
Two questions...
- Can I move these JavaScript calls to the head of the page? If so, what is the best way?
- Can these calls be suppressed on non-contact pages?
Many thanks,
David.
Thanks for that - very useful.
Is there a version of wpcf7_enqueue_scripts for the CSS?
If I wish to switch it off using WPCF7_LOAD_CSS, is there an equivalent of the enqueue_scripts so that I can switch it back on for just the relevants pages?
You can get it by simply load the CSS file with <link rel="stylesheet" ... > tag in your header.php. Current version of Contact Form 7 does not use wp_enqueue_style(). It might be changed in future version.