Home / css / Deregister Contact Form 7 CSS style sheet
  • How to Deregister Contact Form 7 CSS style sheet


    Just a simple snippet so you can deregister Contact Form 7 CSS style sheet. Just add this to the functions.php of your wordpress theme and you are ready to go.

    ( click code to copy )

    wordpress snippet : PHP

    add_action( 'wp_print_styles', 'wps_deregister_styles', 100 );
    function wps_deregister_styles() {
        wp_deregister_style( 'contact-form-7' );

    ( WordPress codex functions, hooks, in this snippet. )

    register, add_action, wp_deregister_style, wp,
  • Azragh

    You can also add ‘define( ‘WPCF7_LOAD_CSS’, false );’ in wp-config.php 😉

  • Thanks for this code snippet. Might also be worth informing your ‘non-technical’ readers that doing this may cause their contact form to appear ‘broken’ as it removes the CSS styles associated with contact forms.