Support » Fixing WordPress » Disable Jetpack Carousel Comments AJAX calls

  • We don’t particularly want comments on our media, and we certainly don’t want the additional system load that the comment portion of the Jetpack Carousel can cause.

    I don’t currently see any good way to disable comments in Carousel. I have seen posts on how to disable the ability to comment ( ), though this didn’t seem to do much for me. And definitely each image load in the Carousel still resulted in an AJAX call to determine the existing comments.

    I also saw people suggest using your style sheet to hide the comments, but this still results in the ajax calls.

    I realize these calls shouldn’t be that dire, but when a page with a carousel gets a large amount of traffic, it can just crush our server.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello! You can disable the comments editing your funtions.php:

    function filter_deshabilitar_comentarios($open, $idpost) {
        $post_actual = get_post($idpost);
        $salida = false;
        if( $post_actual->post_type != 'attachment' ) $salida = $open;
        return $salida;
    add_filter( 'comments_open', 'filter_deshabilitar_comentarios', 10 , 2 );

    Cómo desactivar los comentarios en las imágenes de la galería Carousel de Jetpack

    I used that method, and the AJAX calls still happen. I want to prevent the AJAX calls. In the end, I edited the plugin file modules/carousel/jetpack-carousel.js to disable the getComments function.



    I give slightly more info on how to work around this issue at my blog, here.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disable Jetpack Carousel Comments AJAX calls’ is closed to new replies.