Support » Theme: Hueman » Display Comment Count on Closed Posts

  • Resolved MD

    (@marcussdixler)


    On our blog the the comments are closed on the posts after X amount of days. I just noticed today that the comment count is not displayed in the thumbnail of these closed posts. We want the comment number displayed so people can see how popular the post was.

    Does anyone know how to have that comment count display on the thumbnails all the time?

    Thanks,
    MD

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator bdbrown

    (@bdbrown)

    Hi MD. You need to modify three theme files:

    1. Copy content.php, content-featured.php and content-standard.php to a child theme.

    2. Find this line:

    <?php if ( comments_open() && ( ot_get_option( 'comment-count' ) != 'off' ) ): ?>

    3. Remove the “comments_open” criteria:

    <?php if ( ( ot_get_option( 'comment-count' ) != 'off' ) ): ?>
    MD

    (@marcussdixler)

    thanks! I have another related question, but not related enough to be in the same post. I’ll post separately.

    MD

    (@marcussdixler)

    Back to this issue again.

    Now it displays on every post, even new posts with closed comments. That is what I wanted, but I didn’t realize how awkward it would look to have it display that it has “Zero comments”.

    Do you know how to make it only show when there is at least one comment?

    To summarize, I need it to display even when the comments are closed, but only if there’s at least one comment. Any ideas?

    Thanks,
    MD

    Moderator bdbrown

    (@bdbrown)

    Try adding the comment count parameter to the criteria.

    Change this:

    <?php if ( ( ot_get_option( 'comment-count' ) != 'off' ) ): ?>

    to this:

    <?php if ( ( ot_get_option( 'comment-count' ) != 'off' ) && ( get_comments_number() != 0 ) ): ?>

    Also, just a note for future reference: if you post a question into a topic that is Resolved (even if it’s your own topic) you may not get a response. Even though your post moves the topic to the top of the list I personally don’t normally go looking at Resolved topics for new questions. You’re better off adding a new topic. Just FYI.

    MD

    (@marcussdixler)

    ok – thanks for your help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Display Comment Count on Closed Posts’ is closed to new replies.