Viewing 3 replies - 1 through 3 (of 3 total)
  • This was used to work, but the filters does not work anymore.

    Thread Starter msebald

    (@msebald)

    Ok, that means the filters won’t work anymore in the future and that I can remove it and only use the new code posted today?

    function deregister_javascript() {
    	if (!is_page('contact')) {
    		wp_deregister_script('contact-form-7'); // Contact form 7
    		wp_deregister_script('google-recaptcha'); // Contact form 7
    	}
    }
    
    add_action('wp_print_scripts', 'deregister_javascript', 999);
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Question: How to Load scripts,styles and recatcha v3 only when needed’ is closed to new replies.