What has changed in Google’s v.3 of reCAPTCHA and how those changes affected Contact Form 7
Google’s reCAPTCHA is one of the best ways to fight contact form spam. That said Contact Form 7 has an extra option under their Integration page which lets you enable v.3 reCAPTCHA Anti-Spam protection to your CF 7 forms.
Version 3 of reCAPTCHA forced anyone using its API to show the reCAPTCHA Badge in all of his/her site pages. So, protecting your site from spam come with a cost since you had to tag your site and add Google’s own branding while this inserted some extra requests to Google(read more about this at the end of this post).
Learn how to remove Google’s reCAPTCHA global site badge, the proper way
This is a short tutorial which will help you remove reCAPTCHA badge from your WordPress site pages without breaking any of Google’s acceptable use policy.
Step 1: Declare usage of Google’s reCAPTCHA in any of your Contact Form pages
Recently Google allowed it’s reCPATCHA users to remove the badge from their sites as long as they included the following text inside their forms just before the “send” or “Submit” button:
This site is protected by reCAPTCHA and the Google
Privacy Policy and
Terms of Service apply.
Step 2: Enable badge invisibility within your Contact Form 7 forms
Next thing you need to do is order your site to hide the reCAPTCHA badge, in order to achieve this you need to add the extra CSS snippet in your theme custom CSS option.
.grecaptcha-badge {
opacity: 0;
}
If your theme doesn’t have an option adding custom/extra CSS code then you can install and activate the Simple Custom CSS plugin and add the CSS snippet in your Dashboard Customization page.
Bonus Tip: How does v.3 of reCAPTCHA affect your site speed
Google’s v3 of reCAPTCHA has some significant changes when compared to the previous version(v2). Apart from showing the badge in all of your site pages, there is one more change which will probably hurt your WordPress site loading speed. Google scripts are now loaded in all of your site pages in a way of predicting your site visitors behaviour and spam score. This way v3 of reCAPTCHA will be more efficient in blocking spammers and whitelisting original visitors and users.
This new way of reCAPTCHA predicting spam visitors actually adds some extra requests to your WordPress site which means that you have to expect a slower response and total load time.
erica says
Huge help! It works like a charm, thank you.
Bit of WP says
Thank you Erica!
Amit says
Awesome! Thanks a ton….
JJ pro says
Didn’t work on avada
Bit of WP says
What happens if you enable a different theme instead of Avada?
Woz says
Brilliant. Such a simple fix and easily explained.
Bit of WP says
Thank you 🙂
Petre Mitrache says
Thank you!
Bit of WP says
Thanks a lot Petre!
Diego says
Muito obrigo!
Bit of WP says
Muchas gracias 😀
Olyana says
Thank you for your article ! Very helpful for my clothes website (Olyana-clothes.com) !
Bit of WP says
Thanks!
Warren says
Thanks! This worked perfectly for my site.
Bit of WP says
Thank you Warren!
Ruben says
Thank you! Funciona perfecto con Génesis Framework
Sajjad says
Thank you so much for the article.
I have question, How to load only recaptcha files on specific pages where we need the recaptcha instead of loading the files on all website pages?
This page https://contactform7.com/loading-javascript-and-stylesheet-only-when-it-is-necessary/ how to load contact form 7 files when it is necessary but there is nothing about recaptcha.
Thanks.
Bit of WP says
try the following:
function stop_recaptcha() {
if ( is_page_template( 'template-contact.php' ) ) {
if ( function_exists( 'wpcf7_enqueue_scripts' ) ) {
wpcf7_enqueue_scripts();
wp_enqueue_script( 'google-recaptcha' );
}
}
add_action( 'wp_enqueue_scripts', 'stop_recaptcha' );
source
or
//Add page slug you want to allow to array
if ( !is_page( array( 'contact','some-other-page-with-form' ) ) ){
wp_dequeue_script( 'google-recaptcha' );
//wp_dequeue_script( 'google-invisible-recaptcha' );
}
});
source
sirisha says
Thank You
Michal says
Hah, Thank You, i was looking for remove this bagde for few hours! Thanks!
Uchechukwu Ajuzieogu says
This is the most effective way to get this done! I’m definitely bookmarking your page. Thanks to the Editorial Team.
Therese Gerber says
Thank you! So glad I found your page.
Thanh Thai says
Thank you! So glad I found your page.
Oriol says
Thank you, such a great and easy to follow help!!
Rajat Kapoor says
Works like a charm… There is very slight difference in speed too…
Thanks for your help
Best Vastu Shastra Consultant In Jaipur says
Thanks, Well it works dramatically but is it good? Can google stop this working?
Notas de prensa gratis says
Funciona perfecto, gracias por compartir!!!. Me tapaba un botón flotante que tengo y ahora ya no se ve.
UK Properties says
This article really helped me one putting contact form 7 with recaptcha. Thank you so much for sharing. Keep the good work up.