WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
[resolved] How to remove "Loading Comments" from Jetpack Carousel (8 posts)

  1. wpforum
    Member
    Posted 8 months ago #

    How can I remove "Loading Comments" in the below left corner of the image when I click a image using the Carousel slideshow in Jetpack.

    Visit http://michelnafziger.com/projects/beauty/ and click an image.

    Can I changed some code in jetpack-carousel.css to have "Loading Comments" no longer appear?

    http://wordpress.org/plugins/jetpack/

  2. wpforum
    Member
    Posted 8 months ago #

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

  3. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 8 months ago #

    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 );
  4. wpforum
    Member
    Posted 8 months ago #

    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.

  5. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 8 months ago #

    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:
    http://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.

  6. wpforum
    Member
    Posted 8 months ago #

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

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

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

  7. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 8 months ago #

    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.

  8. Dave Warfel
    Member
    Posted 4 months ago #

    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.)

Reply

You must log in to post.

About this Plugin

About this Topic