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.

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

Comments  Leave a Reply

  1. 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.

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

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!