Title: Blocking Style Enqueue
Last modified: January 16, 2018

---

# Blocking Style Enqueue

 *  Resolved [jrcwp](https://wordpress.org/support/users/jrcwp/)
 * (@jrcwp)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/blocking-style-enqueue/)
 * How can I remove the inline style section being added to the head section of 
   every page [ie, the <style text/css>class, class, etc</style>.
 * 1) I use html5 so it should read only <style>.
    2) it inserts many lines of css
   when it would be better as a separate css file, ideally my own theme’s style.
   css.
 * I can remove all the enqueued scripts via the recommended additions to the functions.
   php file [ add_filter( ‘wpcf7_load_js’, ‘__return_false’ ); and add_filter( ‘
   wpcf7_load_css’, ‘__return_false’ ); ]
 * But doing so does not remove the added style section.

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

 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/blocking-style-enqueue/#post-9870817)
 * Switch to another theme or edit the current theme’s header template. Or, deactivate
   plugins if they are putting the inline style rules.
 *  Thread Starter [jrcwp](https://wordpress.org/support/users/jrcwp/)
 * (@jrcwp)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/blocking-style-enqueue/#post-9870911)
 * Takayuki:
 * Thanks for the idea. The Contact Form 7 is the plugin that is adding styles in
   the head. As I indicated, the add_filter codes provided do remove the enqueued
   file links, but the plugin is adding simple <style> tags in the head, not as 
   a link to a stylesheet.css. I only want that code for when the contact form is
   included, not on all other pages.
 * John
 *  Thread Starter [jrcwp](https://wordpress.org/support/users/jrcwp/)
 * (@jrcwp)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/blocking-style-enqueue/#post-9873641)
 * This is the code being added during the wp_head action:
 *     ```
       <style type="text/css">
       div.wpcf7 .screen-reader-response {
         position: absolute;
         overflow: hidden;
         clip: rect(1px, 1px, 1px, 1px);
         height: 1px;
         width: 1px;
         margin: 0;
         padding: 0;
         border: 0;
       }
       div.wpcf7 .form-inline img.ajax-loader {
         display: inline;
       }
       div.wpcf7 .ajax-loader {
         visibility: hidden;
         display: inline-block;
         background-image: url('https://......./wp-content/plugins/contact-form-7/images/ajax-loader.gif');
         width: 16px;
         height: 16px;
         border: none;
         padding: 0;
         margin: 0 0 0 4px;
         vertical-align: middle;
       }
       div.wpcf7 .ajax-loader.is-active {
         visibility: visible;
       }
       div.wpcf7 div.ajax-error {
         display: none;
       }
       div.wpcf7 .wpcf7-display-none {
         display: none;
       }
       div.wpcf7 .placeheld {
         color: #888;
       }
       div.wpcf7 .wpcf7-recaptcha iframe {
         margin-bottom: 0;
       }
       div.wpcf7 input[type="file"] {
         cursor: pointer;
       }
       div.wpcf7 input[type="file"]:disabled {
         cursor: default;
       }
       div.wpcf7 .form-inline .form-group {
         max-width: 250px;
       }
       div.wpcf7 .input-group-addon img {
         height: 100%;
         width: auto;
         max-width: none !important;
         border-radius: 5px;
       }
       div.wpcf7 .input-group-addon.input-group-has-image {
         padding: 0;
       }
       </style>
       ```
   
 *  Thread Starter [jrcwp](https://wordpress.org/support/users/jrcwp/)
 * (@jrcwp)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/blocking-style-enqueue/#post-9879219)
 * The offender was located. Styles being added by plugin “Bootstrap for Contact
   Form 7.”

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

The topic ‘Blocking Style Enqueue’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [jrcwp](https://wordpress.org/support/users/jrcwp/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/blocking-style-enqueue/#post-9879219)
 * Status: resolved