Codes

Disable Gutenberg CSS on the frontend

function csi_unload_files() {
 
        wp_dequeue_style ( 'wp-block-library' );
        wp_dequeue_style ( 'wp-block-library-theme' );
 
 }
 add_action( 'wp_enqueue_scripts', 'csi_unload_files', 100 );

Disable Google Fonts

add_filter( 'elementor/frontend/print_google_fonts', '__return_false' );

Disable Font Awesome

add_action('elementor/frontend/after_register_styles',function() { 
 
        foreach( [ 'solid', 'regular', 'brands' ] as $style ) {
                wp_deregister_style( 'elementor-icons-fa-' . $style );
        }
 
}, 20 );

Disable Elementor Icons

function csi_unload_files() {
 
        if ( is_admin() || current_user_can( 'manage_options' ) ) {
                return;
        }
 
        wp_deregister_style( 'elementor-icons' ); 
 
 }
 add_action( 'wp_enqueue_scripts', 'csi_unload_files', 100 );

Leave a Comment