To remove the CSS added by the WordPress Jetpack plugin using a filter, you can use the jetpack_implode_frontend_css filter. Here’s how you can do it in your theme’s functions.php file:

function remove_jetpack_css() {
    add_filter( 'jetpack_implode_frontend_css', '__return_false' );
}
add_action( 'after_setup_theme', 'remove_jetpack_css' );

This code will prevent Jetpack from loading its CSS styles on the front end of your website. Simply add this code snippet to the functions.php file of your active theme, and the Jetpack CSS will be effectively removed.

function wp_remove_jetpack_styles(){
wp_deregister_style('AtD_style'); // After the Deadline
wp_deregister_style('jetpack-carousel'); // Carousel
wp_deregister_style('grunion.css'); // Grunion contact form
wp_deregister_style('the-neverending-homepage'); // Infinite Scroll
wp_deregister_style('infinity-twentyten'); // Infinite Scroll - Twentyten Theme
wp_deregister_style('infinity-twentyeleven'); // Infinite Scroll - Twentyeleven Theme
wp_deregister_style('infinity-twentytwelve'); // Infinite Scroll - Twentytwelve Theme
wp_deregister_style('noticons'); // Notes
wp_deregister_style('post-by-email'); // Post by Email
wp_deregister_style('publicize'); // Publicize
wp_deregister_style('sharedaddy'); // Sharedaddy
wp_deregister_style('sharing'); // Sharedaddy Sharing
wp_deregister_style('stats_reports_css'); // Stats
wp_deregister_style('jetpack-widgets'); // Widgets
}
add_action('wp_print_styles', 'wp_remove_jetpack_styles');

Leave a comment