• 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/
    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/

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