WPSurfer.com

How to Remove Global Styles in WordPress

Published on September 24, 2022 | Updated on September 24, 2022

By default, WordPress loads global styles and SVG filters through block-based themes, which can be useful for many sites.

However, if you’re not using these features or need to optimize your site’s performance by reducing unused resources, you can remove these actions

remove_action( 'wp_enqueue_scripts', 'wp_enqueue_global_styles' );
remove_action( 'wp_body_open', 'wp_global_styles_render_svg_filters' );
Manuel Campos

Manuel Campos

I am José Manuel. I am writing about things I know and things that I am learning about WordPress. I hope you find the content of this blog useful.