Skip to content
Rarst edited this page Oct 12, 2014 · 3 revisions

Jetpack

Jetpack's tiled galleries and carousel view disable themselves if they detect other code competing for same hooks. They also require scripts and style assets to function. Natively they will turn off, when running with Fragment Cache enabled.

Tiled gallery functionality can be force enabled with code, for example:

add_filter( 'jetpack_tiled_gallery_shortcode_redefined', '__return_false' );

add_action( 'wp_enqueue_scripts', function () {

	if ( ! class_exists( 'Jetpack_Tiled_Gallery' ) ) {
		return;
	}

	if ( is_singular() && has_shortcode( get_post_field( 'post_content', get_post() ), 'gallery' ) ) {
		Jetpack_Tiled_Gallery::default_scripts_and_styles();
	}
} );

For carousels solution hadn't been worked out yet.

Clone this wiki locally