How to remove stylsheets 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 );
Posted in Code snippets, Tips & Tricks | Tagged , , , , | Comments Off on How to remove stylsheets added by Tiled Galleries and Carousel
  • Enter your email address to follow this blog and receive news and updates from Jetpack!

    Join 112.3K other subscribers
  • Browse by Topic