• I’ve successfully put CF7 on just 4 pages on my website. During a page audit this week (working on speed), I spotted that CF7 is putting baggage on every page of my website! This includes bringing in Google ReCaptcha. Is there any way to stop CF7 from doing this? I run my own theme and am comfortable editing functions.php if there is a way of stopping the plugins output except when it’s on a page which really does have a form.

    /Warren

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thread Starter europatech

    (@europatech)

    Thanks, Takayuki. I’m glad there is a solution to this.

    Rather that create another page template, could I use an existing one, use a call to the_title(“”,””,false) to identify the page and call:

    add_filter( ‘wpcf7_load_js’, ‘__return_false’ );
    add_filter( ‘wpcf7_load_css’, ‘__return_false’ );

    … when I know I’m on a page which doesn’t need CF7?

    /W

    Thread Starter europatech

    (@europatech)

    I’ve added:

    add_filter( ‘wpcf7_load_js’, ‘__return_false’ );
    add_filter( ‘wpcf7_load_css’, ‘__return_false’ );

    to functions.php in my theme but it’s not switching off CF7.

    There doesn’t seem to be much that could go wrong here, but sadly it’s not working. Any ideas?

    /W

    • This reply was modified 4 years, 9 months ago by europatech.
    Thread Starter europatech

    (@europatech)

    Even the other method in my wp-config.php:

    define( ‘WPCF7_LOAD_JS’, false );
    define( ‘WPCF7_LOAD_CSS’, false );

    … doesn’t seem to work for me either!

    /W

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘CF7 baggage on every webpage?’ is closed to new replies.