Viewing 4 replies - 1 through 4 (of 4 total)
  • AMX

    (@lightscapes)

    I would like to bump this thread. The plugin works like a charm, but it loads Google scripts on every page and post, even though I only use it on two pages with contact 7 forms. The script is relatively heavy and affects page load times and scores.

    It would be great to be able to load it only when needed. If it’s not possible, I will have to look for alternative solutions. Other than that, it is a very good plugin indeed.

    Cheers
    Tom

    Plugin Author MihChe

    (@mihche)

    Hi,

    
    add_action('wp_print_scripts', function (){
    	if(is_home() || !is_page( array( 'PAGE ID WHERE YOU WANT IT', 'YOUR LOGIN PAGE ID', 'OTHER LOGIN PAGE ID' ) )){
    		wp_dequeue_script( 'google-invisible-recaptcha' );
    	}
    });
    
    

    Just add the ID’s of the pages where you want invisible reCaptcha. Please let me know if this works for you.

    Mihai

    Quick question… where does this code go? functions.php?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove Invisible reCaptcha from Home and other non-login pages’ is closed to new replies.