WordPress Global & Classic Theme Styles

Remove New CSS Items in WordPress

For this post I’m returning to another subject of perennial interest; WordPress optimisation and streamlining.

Previously, I discussed my methods for reducing the quantity of (sometimes) superfluous content in the header in order to reduce general bloat, but more importantly, to remove non required pre-rendering items and http calls.

This time we have another two new items to consider since WP 5.x.x Many who do not use the the Gutenberg editor, myself included, may notice a couple of new automatically generated items populating the header.

The new items are a rel link to a minified CSS file with ID “classic-theme-styles-css”
and a few lines of inline CSS with the ID “global-styles-inline-css”

The new items populating the header are generated in the WP core and populate the wp_head()
Highlighted in orange.

Neither of these items are particularly troublesome and both are lightweight in terms of content but if you, like me, just don’t like to have anything populating the header other than your own styles and files then you can remove both to keep things a bit more streamlined.

Please note that this operation is only relevant to those of us who, for what ever strange reason, prefer to run the WP back-end with the classic editor rather than Gutenberg. Otherwise removing this content will break some functions and features of your installation.

Removal is simply a case of adding standard dequeue and deregister functions into the functions.php file as below. Sorry these are screen grabs this time.

More articles about WP streamlining and SEO critical mods here: –

Clean up the header >

Optimisation 101 >

«   |   »

Category: code, Technology, WordPress   Tags: ,


prestbury web


Set up in 2016 by Oliver Wood, Prestburyweb provides support in all aspects of web based media to business & organisations across the UK.


© 2024   Presweb Wordpress theme by Oliver Wood