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

    (@takayukister)

    See Loading JavaScript and stylesheet only when it is necessary

    As far as I can see from the HTML source of the page, the WPCF7_LOAD_JS and WPCF7_LOAD_CSS constants are working as expected.

    Thread Starter acurran

    (@acurran)

    Thanks for your response! Ok, so you’re saying that the contact form works fine without the JavaScript and CSS files? Because in my example WPCF7_LOAD_JS and WPCF7_LOAD_CSS are set to false, yet the form works fine? If the form doesn’t need the JavaScript and CSS files to work, what exactly do they do?

    Also I just set up the recaptcha integration and it appears on every page even though WPCF7_LOAD_JS and WPCF7_LOAD_CSS are set to false – is that as expected?

    If so, what is best approach to remove recaptcha scripts from pages that don’t have forms? (and yes, I already know that there is a reason why recaptcha should be on other pages too to analyse the user and improve accuracy, but still I want to remove it).

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Approach for loading JS and stylesheet only on specific pages not working’ is closed to new replies.