• Hi. I’m new to WordPress and I am having a problem with Contact Form 7 when trying to have a website open after the user clicks submit on the contact form. I found this on their website but don’t know how to add it to header.php …

    •JavaScript file is not loaded
    This is the cause that I’ve been seeing most recently. This is due to your template, which is missing calling functions for queuing JavaScript. The functions required are wp_head() and wp_footer(), and they are in header.php and footer.php, respectively, in most correct themes.

    The script I’m using in Contact Form 7 in the “Additional Headers” field is => on_sent_ok: “location = ‘http://example.com/’;”

    Thanks for any help you can give me 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter dpic44

    (@dpic44)

    Forgot to include our website and the site we are trying to redirect the contact to …

    Our website is http://goglobalpr.com.

    The script I’m using in Contact Form 7 in the “Additional Headers” field is => on_sent_ok: “location = ‘http://madonna.edu/’;”

    If I am reading correctly, what they are saying is that your theme might not include wp_head() and wp_footer().

    Have you checked in the theme folder, in the file called header.php to see if it says wp_head() somewhere? And the same goes for footer.php and wp_footer()?

    Thread Starter dpic44

    (@dpic44)

    Hi. Yes, I checked both files. Footer.php is fine but header.php is missing this script. My problem is that I don’t know where to add it and the correct syntax to use.

    http://codex.ww.wp.xz.cn/Function_Reference/wp_head

    <?php
     ...
        /* Always have wp_head() just before the closing </head>
         * tag of your theme, or you will break many plugins, which
         * generally use this hook to add elements to <head> such
         * as styles, scripts, and meta tags.
         */
        wp_head();
     ?>
     </head>

    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Loading Java in header.php for Contact Form 7’ is closed to new replies.