mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-01 11:52:25 +08:00
https://wordpress.org/support/topic/help-disabling-google-recaptcha-except-on-contact-page/
7 lines
286 B
Text
7 lines
286 B
Text
add_filter(‘wpcf7_recaptcha_actions’, ‘wpcf7_recaptcha_only_contact‘);
|
||
function wpcf7_recaptcha_only_contact( $actions ) {
|
||
if ( is_page(‘contact’) ) { // Replace ‘contact’ with your contact page slug
|
||
return $actions;
|
||
}
|
||
return array(); // Don’t load it anywhere else
|
||
}
|