Disabling the Carousel commenting of WP Jetpack

Jetpack is one of the best plugin to add to your site because of its cool features packed in one plugin. One I mostly use is the image carousel to easily add a lightbox popup in your gallery page but it has a built in commenting that you cannot disable from any of the built it options available.

You can quickly disable it by adding this snippet in your theme’s function.php file:

function jetpack_carousel_disable_comment( $jpimages, $postid ) {
$posts = get_post( $postid );
if( $posts->post_type == 'attachment' ) {
return false;
return $jpimages;
add_filter( 'comments_open', 'jetpack_carousel_disable_comment', 10 , 5 );

view raw


hosted with ❤ by GitHub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.