This function allows you to hide the reCAPTCHA icon that appears on the bottom right hand corner of the screen when installing Contact Form 7 reCAPTCHA Integration. This gets in the way and looks bad especially when chatbox is present for customer communications. We have only used this with the Contact Form 7 (https://yoursite.com/wp-admin/admin.php?page=wpcf7-integration)
<?php
// hides the Captcha v3 box on the lower right hand corner used by Contact Form 7
add_action( 'wp_head', 'hide_grecaptcha_badge' );
function hide_grecaptcha_badge() {
echo '<style>.grecaptcha-badge { display: none !important; }</style>';
}
?>
We save that to a file named: /inc-captcha-hide-box.php in a folder on the root called inc. The complete path is /inc/inc-captcha-hide-box.php. The inc folder is created in the root folder of the child theme, you don’t want to put this in a theme without a child because when the theme gets updated it can overwrite the functions.php.
Now that we have the file in the folder. We can call it from the functions.php in the root directory of the child theme. https://developer.wordpress.org/themes/basics/theme-functions/
// hides the Captcha v3 box on the lower right hand corner used by Contact Form 7
require get_theme_file_path('/inc/inc-captcha-hide-box.php');
Help keep our website ad-free and running smoothly! With a small donation of just $3.62, you can support our efforts to maintain this valuable resource for everyone to enjoy without the interruption of advertisements. Your contribution helps cover our hosting costs and ensures that we can continue to deliver quality content directly to you. Please consider donating today and become a crucial part of our community. Thank you for your support!
Custom Function Development for WordPress and WooCommerce. For just $93.76, you receive up to one hour of expert development focused solely on crafting a bespoke function that address your specific issue or needs. Just complete the purchase and we will reach out to you for a Screen Sharing session. This service is ideal for adding unique features or optimizing existing functionality, providing targeted improvements without the need for comprehensive development work. All functions are written generically to be used universally and published online.