Title: Loading JS files doesn&#039;t work
Last modified: August 31, 2016

---

# Loading JS files doesn't work

 *  [ronnyrook](https://wordpress.org/support/users/ronnyrook/)
 * (@ronnyrook)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/loading-js-files-doesnt-work/)
 * Hi there,
 * I’m always using contact form 7 for my WordPress websites because it’s extremely
   power full, thank you for developing. But unfortuonaly in a few of my last websites
   I can’t seem to load the javascript files.
 * [http://contactform7.com/loading-javascript-and-stylesheet-only-when-it-is-necessary/](http://contactform7.com/loading-javascript-and-stylesheet-only-when-it-is-necessary/)
   
   I’ve found this ‘tutorial’, but also `wpcf7_enqueue_scripts` isn’t working. I
   want to load the files in the wp_footer so that makes sense because they explained:
 * _“Note that wpcf7\_enqueue\_scripts() and wpcf7\_enqueue\_styles() must be called
   before wp\_head() is called.”_
 * I’ve seem to fix it loading the files directly:
 *     ```
       <?php elseif( is_page('contact') || is_page('offertes') ) : ?>
               <script type="text/javascript" src="/wp-content/plugins/contact-form-7/includes/js/jquery.form.min.js"></script>
               <script type="text/javascript" src="/wp-content/plugins/contact-form-7/includes/js/scripts.min.js"></script>
           <?php endif; ?>
       ```
   
 * But this can’t be the only way to load the files in the footer of my website.
   Any ideas how to fix in a correct way?
 * [https://wordpress.org/plugins/contact-form-7/](https://wordpress.org/plugins/contact-form-7/)

The topic ‘Loading JS files doesn't work’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [ajax](https://wordpress.org/support/topic-tag/ajax/)
 * [directly](https://wordpress.org/support/topic-tag/directly/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [loading](https://wordpress.org/support/topic-tag/loading/)

 * 0 replies
 * 1 participant
 * Last reply from: [ronnyrook](https://wordpress.org/support/users/ronnyrook/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/loading-js-files-doesnt-work/)
 * Status: not resolved