Title: Remove global-styles-inline-css
Last modified: January 26, 2022

---

# Remove global-styles-inline-css

 *  Resolved [RS](https://wordpress.org/support/users/rsdotscot/)
 * (@rsdotscot)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/remove-global-styles-inline-css/)
 * Hi folks,
 * I’ve just updated a site which doesn’t use Gutenberg to 5.9 and a huge block 
   of styling has appeared at the top of every page (id=”global-styles-inline-css”).
 * How do we go about removing this?
 * Cheers,
    RS
    -  This topic was modified 4 years, 4 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
      Reason: Moved to Fixing WordPress, this is not an Everything else WordPress
      topic

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

 *  [TheDock](https://wordpress.org/support/users/thedock/)
 * (@thedock)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/remove-global-styles-inline-css/#post-15292060)
 * Hi Rs,
 * just dequeue the ‘global-styles’ style using [wp_dequeue_style](https://developer.wordpress.org/reference/functions/wp_dequeue_style/)
 *  [George Appiah](https://wordpress.org/support/users/gappiah/)
 * (@gappiah)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/remove-global-styles-inline-css/#post-15292151)
 * Also…
 * > I’ve just updated a site which doesn’t use Gutenberg to 5.9
 * Unless you’ve taken steps to actually disable the block editor (aka Gutenberg)
   completely, then you’re using Gutenberg by default. You don’t need to use the
   Gutenberg plugin to use Gutenberg, and merely using another page builder plugin
   does not necessarily disable Gutenberg.
 *  Thread Starter [RS](https://wordpress.org/support/users/rsdotscot/)
 * (@rsdotscot)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/remove-global-styles-inline-css/#post-15292284)
 * [@thedock](https://wordpress.org/support/users/thedock/) much appreciated. I’ll
   give it a bash.
 * [@gappiah](https://wordpress.org/support/users/gappiah/) I’ve only been using
   WP for 18 years across countless installations at this point, but thanks for 
   talking to me like I’m a complete novice. FYI I hate page builders and this site
   uses the classic editor.
 *  Thread Starter [RS](https://wordpress.org/support/users/rsdotscot/)
 * (@rsdotscot)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/remove-global-styles-inline-css/#post-15292343)
 * [@thedock](https://wordpress.org/support/users/thedock/) I’ve tried adding an
   action to wp_enqueue_scripts, wp_footer, and even wp_print_styles, but no luck
   so far. Any ideas?
 *     ```
       add_action( 'wp_enqueue_scripts', function() {
       	wp_dequeue_style( 'global-styles-inline-css' );
       	wp_deregister_style( 'global-styles-inline-css' );
       }, 100000 );
       ```
   
 *  [TheDock](https://wordpress.org/support/users/thedock/)
 * (@thedock)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/remove-global-styles-inline-css/#post-15292355)
 * you don’t need to include the ‘inline-css’ suffix, that’s added by WP since the
   style is inline enqueued with the function wp_add_inline_style().
 * wp_dequeue_style( ‘global-styles’ );
 * should do it.
    -  This reply was modified 4 years, 4 months ago by [TheDock](https://wordpress.org/support/users/thedock/).
 *  Thread Starter [RS](https://wordpress.org/support/users/rsdotscot/)
 * (@rsdotscot)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/remove-global-styles-inline-css/#post-15292399)
 * [@thedock](https://wordpress.org/support/users/thedock/) that did the trick, 
   thanks 🙂
 *  Thread Starter [RS](https://wordpress.org/support/users/rsdotscot/)
 * (@rsdotscot)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/remove-global-styles-inline-css/#post-15292441)
 * [Marking as resolved]
 *  [Gik000](https://wordpress.org/support/users/gik000/)
 * (@gik000)
 * [4 years ago](https://wordpress.org/support/topic/remove-global-styles-inline-css/#post-15615745)
 * This is not solving the problem in my case.
 * Global inline styles are always there.
 * I did that in my child theme:
 *     ```
       /**
        * Remove global script
        */
       add_action( 'wp_enqueue_scripts', function() {
       	wp_dequeue_style( 'global-styles' );
       	wp_deregister_style( 'global-styles' );
       }, PHP_INT_MAX );
       ```
   
 * I also have tried with the inline suffix, but it didn’t work.
 *  [Gik000](https://wordpress.org/support/users/gik000/)
 * (@gik000)
 * [4 years ago](https://wordpress.org/support/topic/remove-global-styles-inline-css/#post-15615807)
 * I got a solution
 *     ```
           remove_action( 'wp_enqueue_scripts', 'wp_enqueue_global_styles' );
           remove_action( 'wp_footer', 'wp_enqueue_global_styles', 1 );
       ```
   
 * see
    [https://developer.wordpress.org/reference/hooks/wp_enqueue_scripts/](https://developer.wordpress.org/reference/hooks/wp_enqueue_scripts/)
 *  [charitygrace](https://wordpress.org/support/users/charitygrace/)
 * (@charitygrace)
 * [4 years ago](https://wordpress.org/support/topic/remove-global-styles-inline-css/#post-15640536)
 * Unfortunately, none of these are working for me. Very annoying. [@gik000](https://wordpress.org/support/users/gik000/)
   is it still working for you with the latest WP update?
 *  [direnc](https://wordpress.org/support/users/direnc/)
 * (@direnc)
 * [4 years ago](https://wordpress.org/support/topic/remove-global-styles-inline-css/#post-15647483)
 * Try this
 *     ```
       add_action( 'init',function(){
           remove_action( 'wp_enqueue_scripts', 'wp_enqueue_global_styles' );
           remove_action( 'wp_footer', 'wp_enqueue_global_styles', 1 );
           remove_action( 'wp_body_open', 'wp_global_styles_render_svg_filters' );
         } );
       ```
   

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

The topic ‘Remove global-styles-inline-css’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 11 replies
 * 6 participants
 * Last reply from: [direnc](https://wordpress.org/support/users/direnc/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/remove-global-styles-inline-css/#post-15647483)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
