When implementing the new Google Invisible reCATPTCHA, by default you get a little "protected by reCAPTCHA" badge in the bottom right of the screen that pops out when you roll over it.
For users of Contact Form 7 on Wordpress this method is working for me:
I hide the v3 Recaptcha on all pages except those with Contact 7 Forms.
But this method should work on any site where you are using a unique class selector which can identify all pages with text input form elements.
First, I added a target style rule in CSS which can collapse the tile:
CSS
div.grecaptcha-badge.hide{
width:0 !important;
}
Then I added JQuery script in my header to trigger after the window loads so the 'grecaptcha-badge' class selector is available to JQuery, and can add the 'hide' class to apply the available CSS style.
My tile still will flash on every page for a half a second, but it's the best workaround I've found so far that I hope will comply. Suggestions for improvement appreciated.
I decided to hide the badge on all pages except my contact page (using Wordpress):
/* Hides the reCAPTCHA on every page */
.grecaptcha-badge {
visibility: hidden !important;
}
/* Shows the reCAPTCHA on the Contact page */
/* Obviously change the page number to your own */
.page-id-17 .grecaptcha-badge {
visibility: visible !important;
}
I'm not a web developer so please correct me if there's something wrong.
EDIT: Updated to use visibility instead of display.
If you are using the Contact Form 7 update and the latest version (version 5.1.x), you will need to install, setup Google reCAPTCHA v3 to use.
by default you get Google reCAPTCHA logo displayed on every page on the bottom right of the screen. This is according to our assessment is creating a bad experience for users. And your website, blog will slow down a bit (reflect by PageSpeed Score), by your website will have to load additional 1 JavaScript library from Google to display this badge.
You can hide Google reCAPTCHA v3 from CF7 (only show it when necessary) by following these steps:
First, you open the functions.php file of your theme (using File Manager or FTP Client). This file is locate in: /wp-content/themes/your-theme/ and add the following snippet (we’re using this code to remove reCAPTCHA box on every page):
But according to the reCAPTCHA Terms of service (that you must have agreed), you must inform visitors about the reCAPTCHA implementation on your site :
These terms do not grant you the right to use any branding or logos
used in our Services. Don’t remove, obscure, or alter any legal
notices displayed in or along with our Services.
UPDATE DEC 2018 (thanks @Sol)
Google now allows to hide the Badge, from the FAQ :
I'd like to hide the reCAPTCHA v3 badge. What is allowed?
You are allowed to hide the badge as long as you include the reCAPTCHA
branding visibly in the user flow. Please include the following text:
This site is protected by reCAPTCHA and the Google
<a href="https://policies.google.com/privacy">Privacy Policy</a> and
<a href="https://policies.google.com/terms">Terms of Service</a> apply.
Google now says "You are allowed to hide the badge as long as you include the reCAPTCHA branding visibly in the user flow." Link
For users of Contact Form 7 on Wordpress this method is working for me: I hide the v3 Recaptcha on all pages except those with Contact 7 Forms.
But this method should work on any site where you are using a unique class selector which can identify all pages with text input form elements.
First, I added a target style rule in CSS which can collapse the tile:
CSS
Then I added JQuery script in my header to trigger after the window loads so the 'grecaptcha-badge' class selector is available to JQuery, and can add the 'hide' class to apply the available CSS style.
My tile still will flash on every page for a half a second, but it's the best workaround I've found so far that I hope will comply. Suggestions for improvement appreciated.
I decided to hide the badge on all pages except my contact page (using Wordpress):
I'm not a web developer so please correct me if there's something wrong.
EDIT: Updated to use visibility instead of display.
If you are using the Contact Form 7 update and the latest version (version 5.1.x), you will need to install, setup Google reCAPTCHA v3 to use.
by default you get Google reCAPTCHA logo displayed on every page on the bottom right of the screen. This is according to our assessment is creating a bad experience for users. And your website, blog will slow down a bit (reflect by PageSpeed Score), by your website will have to load additional 1 JavaScript library from Google to display this badge.
You can hide Google reCAPTCHA v3 from CF7 (only show it when necessary) by following these steps:
First, you open the
functions.php
file of your theme (using File Manager or FTP Client). This file is locate in:/wp-content/themes/your-theme/
and add the following snippet (we’re using this code to remove reCAPTCHA box on every page):Next, you will add this snippet in the page you want it to display Google reCAPTCHA (contact page, login, register page …):
Refer on OIW Blog - How To Remove Google reCAPTCHA Logo from Contact Form 7 in WordPress (Hide reCAPTCHA badge)
Set the
data-badge
attribute toinline
And add the following CSS
Of course you can do it using CSS.
But according to the reCAPTCHA Terms of service (that you must have agreed), you must inform visitors about the reCAPTCHA implementation on your site :
And from the Google Terms of Service
UPDATE DEC 2018 (thanks @Sol)
Google now allows to hide the Badge, from the FAQ :