Comments icon disappears on blog page after comments close?

Home Forums Spacious Free Comments icon disappears on blog page after comments close?


This topic contains 2 replies, has 2 voices, and was last updated by  Rajesh 11 months, 3 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #1379712

    Dominik D.

    On my website’s blog ( I made it so that comments close after 90 days. And as you know, on the Blog page, by every post there’s the category, read more button etc. – as well as an icon showing the number of comments. But the thing is, once the comments close after 90 days, that icon showing the no. of comments disappears. Is there a way to make it stay, so that people can see how many comments a post had when the comments section was open? It’s a small but annoying issue. Thanks!
    Also, I’ve got a question – my comments close after 90 days, but will they stay open forever on pages? I have a Gallery page where comments are enabled, and I do not want them to close, unlike on posts.
    Please help\



    Hi @Dominik D.,

    You can make the comment number appear after the comments close by making a child theme. You can take a reference to make a child theme from the following link.

    After making a child theme, you can make a functions.php file and then copy the code from parent theme. After that, you can find and replace comments_open() with get_comments_number() in the functions.php like shown below.

    if ( get_comments_number() ) { ?>
    				<span class="comments"><?php comments_popup_link( __( 'No Comments', 'spacious' ), __( '1 Comment', 'spacious' ), __( '% Comments', 'spacious' ), '', __( 'Comments Off', 'spacious' ) ); ?></span>
    <?php }

    For the second query, the comment can’t be disabled only in a post as you mentioned.



    Dominik D.

    Hmm, the second issue I fixed, but the first (the code)… either I don’t get it or I did it wrong or it doesn’t work… I made the child theme ok, but I cannot find a comments_open() or anything, and just pasting the code itself doesn’t work… Could you explain it more or something, as it would be good to have the comments icon show the number of comments all the time for posts, even closed..?

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.