Contact Form 7 hide reCAPTCHA badge

If you are wondering how to hide from all pages the reCAPTCHA badge when using Contact Form 7 plugin, I have an WordPress tutorial to show you below.

According to Google’s terms and conditions, you have to show the badge when using reCAPTCHA. But Contact Form 7 is not showing this badge conditionally and you get with it on all pages even if you just have one form on the contact page.

There’s a simple way to hide it. You have to go to functions.php file and add the code below:

function hide_cf7_badge() 
{
    if(!is_page(['contact']))
    {
        wp_dequeue_script('google-recaptcha');
    }
}
add_action('wp_enqueue_scripts', 'hide_cf7_badge');

Just replace “contact” with your page or pages name and it’s done. You have now successfully hidden reCAPTCHA badge on your WordPress website.