Disable Google reCAPTCHA (v3) for all pages Except the one like Contact Page or Submit Form with Contact Form 7

Oh I Will
2 min readJul 30, 2020

--

Recently, Contact Form 7 (CF7) update has caused the Google reCAPTCHA invisible reCAPTCHA logo to show up on all pages in your WordPress. We will help you disable it on every page except which pages you want to show up like contact page or submit form.

1. Disable Google reCAPTCHA v3 for all pages and Google’s Term, Policy

According to Google’s terms, if we disable or remove Google reCAPTHA v3 badge for all pages, the validation will not occur. Because Google recommend the reCAPTCHA script run on many pages that would be more accurate when determining whether visitors (human) or bots who working on your website.

By default, Google get reCAPTCHA script, logo displayed on every page on the bottom right of the screen. This is creating a bad experience for visitors. And your website speed will slow down a bit (reflect by PageSpeed score like Google PageSpeed Insight, GTMetrix, Pingdom…) because your blog will have to load additional 1 JavaScript library of reCAPTCHA from Google on every page. We think this shouldn’t, we should show it when necessary (on some pages).

To avoid Google’s Term and Policy violations due to disable reCAPTCHA script on every page, you can run it on some pages and add this just before the submit button of your form, page:

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.

2. Disable Google reCAPTCHA v3 for all pages except some pages like Contact Page or Submit Form

If you are using the Contact Form 7 version <5.2.x, you can remove reCAPTCHA badge following these steps in our this article:

In this article, we guide you remove Google reCAPTCHA v3 badge on every page with Contact Form 7 version > 5.2.x.

To do that. Firstly, 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:

function oiw_disable_recaptcha_badge_page(){

if ( !is_page( array( 'contact' ) ) ) {

wp_dequeue_script('wpcf7-recaptcha');

For more detail, you can read full our article here: Disable Google reCAPTCHA for all pages Except specific page like Contact Page or Submit Form with Contact Form 7

#ohiwil #reCAPTCHA #WordPress #Tips #Howto

--

--