Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter wpforum

    (@wordpressorgforum)

    UPDATE” Now it says “Write a comment”. I made all the Comments colot white (#fff) in the jetpack-carousel.css.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    I’m afraid you cannot hide this text. You can disable comments altogether though, by adding this code to your theme’s functions.php:

    function tweakjp_rm_comments_att( $open, $post_id ) {
        $post = get_post( $post_id );
        if( $post->post_type == 'attachment' ) {
            return false;
        }
        return $open;
    }
    add_filter( 'comments_open', 'tweakjp_rm_comments_att', 10 , 2 );
    Thread Starter wpforum

    (@wordpressorgforum)

    I added it to style.css child theme as

    @import url('../reveal/functions.php');
    function tweakjp_rm_comments_att( $open, $post_id ) {
        $post = get_post( $post_id );
        if( $post->post_type == 'attachment' ) {
            return false;
        }
        return $open;
    }
    add_filter( 'comments_open', 'tweakjp_rm_comments_att', 10 , 2 );
    
    @import url('../reveal/style.css');

    since the code appeared at the top of the website when I included it in the functions.php in the theme.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    This code won’t work if you add it to a CSS file; it is PHP code, and will only work in a PHP file, like functions.php.

    If you don’t manage to add it to your theme’s functions.php file, you could create a small plugin, like this one:
    https://i.wpne.ws/QrnZ

    Download this zip, upload it to your theme under Plugins > Add New > Upload, and once the plugin is activated the comment form won’t appear in the Carousel View.

    Thread Starter wpforum

    (@wordpressorgforum)

    I uploaded the dis-com plugin to these two sites.

    https://margaretsphotoplace.com/projects/botanical/# – Loading comments appear every time I click an image in the slideshow.

    https://michelnafziger.com/projects/west-10-st-book/ – Loading comments no longer appears.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    I do not see the comment form on any of the sites. You will, however, keep seeing the “Loading Comments” message while the page is still loading, as it’s added via javascript independently of the comment form itself. I’m afraid you cannot hide this text.

    If you want to hide the “Loading Comments…” text with CSS, you can add the following line to your theme’s CSS file, or Jetpack’s Custom CSS module:

    #jp-carousel-comments-loading { display: none !important; }

    That won’t stop the plugin from inserting the HTML elements on your page, but it should hide it from your visitors. (I tried testing, but it loads so fast that it’s hard to tell if this CSS is overriding the inline styles adding via javascript.)

    awesome – thanks Dave!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to remove "Loading Comments" from Jetpack Carousel’ is closed to new replies.