Contact Form 7 reCAPTCHA Limiter is a WordPress plugin that ensures the reCAPTCHA scripts and styles are loaded only on pages containing Contact Form 7 forms. This improves performance and eliminates unnecessary reCAPTCHA assets on other pages.
- Limits reCAPTCHA scripts and styles to pages with
[contact-form-7]
shortcodes. - Prevents unnecessary loading of Google reCAPTCHA resources on unrelated pages.
- Improves site performance by reducing the number of globally loaded scripts.
- WordPress 5.0 or higher
- Contact Form 7 plugin installed and active
- PHP 7.0 or higher
- Download the plugin files from the repository or your zip archive.
- Extract the files and upload the folder
contact-form-7-recaptcha-limiter
to the/wp-content/plugins/
directory.
- Go to the Plugins section of your WordPress admin panel.
- Find "Contact Form 7 reCAPTCHA Limiter" in the list and click Activate.
The plugin automatically handles the reCAPTCHA script management. Once activated:
- Visit any page with a Contact Form 7 form containing the
[contact-form-7]
shortcode, and reCAPTCHA will load. - Other pages without the shortcode will not load the reCAPTCHA scripts or styles.
- The plugin detects pages with the
[contact-form-7]
shortcode. - It ensures that the
google-recaptcha
andwpcf7-recaptcha
scripts are only enqueued on those pages. - Other pages remain unaffected, improving load time and reducing unnecessary script calls.
By default, Contact Form 7 loads reCAPTCHA scripts and styles globally on all pages, which can impact site performance. This plugin prevents that and ensures reCAPTCHA is only loaded when required.
No, it works as an add-on to Contact Form 7 without modifying its core files.
No, it only affects the loading behavior of reCAPTCHA scripts and styles. Other functionalities remain intact.
Yes, but ensure you clear your cache after activating or deactivating the plugin.
For any issues or feature requests, please open an issue or contact the plugin author.
This plugin is licensed under the Apache 2.0 License. See the LICENSE
file for more details.
Contributions are welcome! If you'd like to contribute:
- Fork the repository.
- Create a feature branch.
- Submit a pull request.
Add a Contact Form 7 shortcode to your page content:
[contact-form-7 id="123" title="Contact form 1"]