Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @arijal

    Please add the following lines of codes to functions.php of your theme

    function agr_dequeue_script() {
    
    	if( is_singular( array('post','page') ) || is_home() || is_front_page() || is_archive() || is_search() ){
    
    		//remove scripts
    		wp_dequeue_script( 'advanced-google-recaptcha-custom' );
    		wp_dequeue_script( 'advanced-google-recaptcha-api' );
    
    		//remove style
    		wp_dequeue_style( 'advanced-google-recaptcha-style' );
    	}
    
    }
    
    add_action( 'wp_enqueue_scripts', 'agr_dequeue_script', 100 );

    It will remove scripts and styles added by the plugin from post/page/home/archive and search pages.

    Kindly let us know if you need further help.

    Thank you.

    Thread Starter arijal

    (@arijal)

    thanks
    hug and love from Indonesia

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Load ‘recaptcha/api.js’ just for enabled forms’ is closed to new replies.