Archived topic
Not reading functions.php
1 reply · Started by kayo404 on June 18, 2021
Hi,
I have a site that I have installed Contact Form 7 on, and on the developer site, there is a code that can be added to the functions.php to stop loading the contact form.
My page with the contact form: https://kayove.no/kontakt/
Themes:
Active: GeneratePress Child - Version: 0.1
GeneratePress - Version: 3.0.3
Plugins installed:
GP Premium
Contact Form 7
From the developer: https://contactform7.com/loading-javascript-and-stylesheet-only-when-it-is-necessary/
I have added this code in the functions in the child theme.
GeneratePress Child: Theme Functions (functions.php)
add_filter( 'wpcf7_load_js', '__return_false' );
add_filter( 'wpcf7_load_css', '__return_false' );
My page: https://kayove.no/kontakt/ still loads the contact form.
Any idea why this is not loaded? I have not installed any caching plugins.
Hi there,
they should work if those filters exist and they are given enough priority - you may want to check with the Plugin author as to why they do not.