Forums

[Plugin: Contact Form 7] Moving JavaScript (4 posts)

  1. dartiss
    Member
    Posted 2 years ago #

    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...

    1. Can I move these JavaScript calls to the head of the page? If so, what is the best way?
    2. Can these calls be suppressed on non-contact pages?

    Many thanks,
    David.

  2. Takayuki Miyoshi
    Member
    Posted 2 years ago #

  3. dartiss
    Member
    Posted 2 years ago #

    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?

  4. Takayuki Miyoshi
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic