Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1135163

    Hey there,

    I am trying to find a clean solution to stop the integration of the Recaptcha v3 badge on pages not containing the contact form. Would be happy if someone could help me out!

    Thanks a bunch,
    eC

    • This topic was modified 4 years, 10 months ago by eC.
    #1135543

    Hey eC,

    As far as I know, it’s not possible to do so. Please refer to this: https://stackoverflow.com/questions/44543157/how-to-hide-the-google-invisible-recaptcha-badge

    Best regards,
    Rikard

    #1135873

    Hi Rikard,

    thanks for your answer! On another site, where I’m using CF7, I found this solution to give the best results:

    function my_register_cf7_js() {
        // Dequeue cf7 and recaptcha scripts, preventing them from loading everywhere
        add_filter( 'wpcf7_load_js', '__return_false' ); // Might as well use their filter
        wp_dequeue_script( 'google-recaptcha' );
    
        // If current post has cf7 shortcode, enqueue!
        global $post;
        if ( isset( $post->post_content ) AND has_shortcode( $post->post_content, 'contact-form-7' ) ) {
            if ( function_exists( 'wpcf7_enqueue_scripts' ) ) {
                wpcf7_enqueue_scripts();
                wp_enqueue_script( 'google-recaptcha' );
            }
        }
    }
    
    add_action( 'wp_enqueue_scripts', 'my_register_cf7_js', 20, 0 );

    Could you help me to modify it, so that it works with the Enfold-internal contact forms?

    Thanks and best regards,
    eC

    #1136329

    Hi eC,

    We can’t do that to be honest with you, since it’s not allowed to do so according to the Google Terms of Service. It’s up to you if you want to break the terms, but we can’t help you out doing so unfortunately.

    Best regards,
    Rikard

    #1136423

    Hi Rikard,

    the Google FAQ says, that it’s alright to hide it as long as the branding is visible in the user flow (which it still is if you include it on pages with forms).

    So would be happy to get some help regarding the tweaking of the code.

    Thanks a bunch and best regards,
    eC

    • This reply was modified 4 years, 10 months ago by eC.
    #1137263

    Hi,

    Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Basilis

    #1138577

    Hi,

    that’s unfortunate. Could maybe someone tell me the CSS instead, to put the badge on the left side of the screen?

    Thanks,
    e

    #1139425

    Hi,

    Please make sure you are using the latest version of the theme 4.6.2 and go to Enfold > Privacy and Cookies > Show a badge and select the appropriate options :)

    Best regards,
    Vinay

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.