With WP Ghost you can hide the Gutenberg wp-block classes in the frontend.
We didn’t add this class name automatically to the plugin, but we will show you how to do that using the text mapping feature.
Note! As the CSS and JS files are now loading dynamically to change the wp-block in all files, we recommend using a cache plugin to speed up the loading after the files are changed.
If your theme does not use Gutenberg blocks, we recommend avoiding loading the wp-block library in the frontend to improve the loading speed and security.
functions.php file from the right-hand side menu.functions.php fileadd_filter( 'should_load_separate_core_block_assets', '__return_true' );
add_action( 'wp_enqueue_scripts', function() {
wp_dequeue_style( 'wp-block-library' ); // Gutenberg blocks
wp_dequeue_style( 'wp-block-library-theme' );
wp_dequeue_style( 'wc-block-style' ); // WooCommerce
wp_dequeue_style( 'storefront-gutenberg-blocks' ); // Storefront theme
wp_dequeue_style( 'classic-theme-styles' );
}, 100 );
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' );
With these two solutions applied, the wp-block library will no longer be loaded in the frontend, and the class names will be changed to not reflect any more WordPress Gutenberg blocks.
Because hackers often use bots to search for security flaws in your website, it is…
The easiest way to change the default media uploads path is to use the WP…
To hide all CSS and JS you need to follow the steps to Combine the…
https://youtu.be/6ylhojSi-_E In this video, we’ll explore why website security matters and what can happen if…
The security of your WordPress site depends on multiple factors, such as the strength of…
When you enable two-factor authentication (2FA) for your WordPress website, it adds an extra layer…