Approach for loading JS and stylesheet only on specific pages not working
-
The approach for loading JavaScript and stylesheet only on specific pages as documented here does not work:
https://contactform7.com/loading-javascript-and-stylesheet-only-when-it-is-necessary/Defining these constants in wp-config.php does not stop the loading of Contact Form 7.
define( 'WPCF7_LOAD_JS', false ); define( 'WPCF7_LOAD_CSS', false );
To eliminate the possibility that it could be an issue specific to the site I was working, I set up this demo site with default WP theme and latest versions of WP and CF7:
I added the above lines to define the WPCF7_LOAD_JS and WPCF7_LOAD_CSS constants as false in the wp-config file. But the contact form still appears:
https://demo.sww.co.nz/contact-us/
Can anyone advise?
The page I need help with: [log in to see the link]
- The topic ‘Approach for loading JS and stylesheet only on specific pages not working’ is closed to new replies.