Hide reCAPTCHA Badge on Non-Form Pages for Contact Form 7
Hide the reCAPTCHA badge on every page without a Contact Form 7 form, and stop its scripts slowing those pages.
Install in
Hide reCAPTCHA Badge on Non-Form Pages for Contact Form 7 loads Google reCAPTCHA v3 only on the pages that show a Contact Form 7 form. Every other page loses the badge and the Google scripts behind it.
Contact Form 7 loads reCAPTCHA v3 on your whole site once you connect it, so the badge sits on pages that have no form. This plugin removes it there and leaves your forms protected.
What you get
- The reCAPTCHA badge disappears from pages without a form
- Fewer third-party scripts on those pages, so they load faster
- Forms keep full reCAPTCHA spam protection
- Forms are found wherever they are: content, footer, sidebar, widgets, page builders and popups
- Nothing to configure
How it works
The plugin watches whether Contact Form 7 puts a form on the page. If it does, reCAPTCHA loads as usual. If it does not, the scripts are never printed, so there is no badge to hide with CSS.
Source code and issues: GitHub
Written by Joobi from the project's own listing. See the source page
2.1.0
- Fixed: forms in a footer, widget, page builder section or popup keep reCAPTCHA, so their submissions go through.
- Improved: tested against WordPress 7.2, PHP 8.6 and Contact Form 7 6.2.6.
2.0.0
- Complete rewrite with modern PHP 8+ practices
- Improved performance with optimized detection
- Better code structure with singleton pattern
- Added CF7 dependency check
- Updated for WordPress 6.8 and Contact Form 7 6.1.3
- Requires PHP 7.4+, WordPress 6.7+, Contact Form 7 5.1+
1.0.2
- Removed CSS to hide grecaptcha-badge
1.0.1
- Bug fixes
1.0.0
- Initial release
Follow this listing's changes (Atom feed)