How to remove stylesheets added by Tiled Galleries and Carousel

If you wish to use your own stylesheets instead of the ones that are automatically added to the posts where you’ve inserted a Tiled Gallery, or a gallery using Carousel, you can add the following code to your theme’s functions.php file, or to a functionality plugin. To remove Tiled Galleries’s stylesheet:
function tweakjp_rm_tiledcss(){
    wp_dequeue_style( 'tiled-gallery' );
}
add_action( 'wp_footer', 'tweakjp_rm_tiledcss' );
To remove Carousel’s stylesheet:
function changejp_dequeue_styles() {
    wp_dequeue_style( 'jetpack-carousel' );
}
add_action( 'post_gallery', 'changejp_dequeue_styles', 1001 );

Explore the benefits of Jetpack

Learn how Jetpack can help you protect, speed up, and grow your WordPress site.

Explore plans

Have a question?

Comments are closed for this article, but we're still here to help! Visit the support forum and we'll be happy to answer any questions.

View support forum