• Resolved Mario Beach

    (@mariobeach)


    Hi, I’m using a custom skin loop on my post archive page. I’m showing Title, Excerpt Date and number of comments. The problem is whenever the Comments are closed, the number of comments is not showing. The post still has a number of comments even if comments are closed. I think it should still display it whether comments are open or closed. For now I will filter comments_open on home and archive to make it beleive they are open but I think it should be fixed.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Mario Beach

    (@mariobeach)

    I realized the the post-info widget is an elementor pro widget usually used in singluar posts templates. When used in a loop there is a problem because it takes in consideration the comments_open on singular where it should not in loops. Can you fix this? The filter is not working either as I have no idea how to tell I’m in that custom loop is_archive() or is_home() is false inside these custom loop, is_signular() is true. Any idea how I could find out that I’m in the custom loop in the comments_open filter? If I return true on everything in my filter the comment count is showing correctly but also comments are open on the posts. Any help welcome.

    Thread Starter Mario Beach

    (@mariobeach)

    Ok I found a workaround if anyone needs. The predefined Comments element in the Post Info Meta Data returns no value in the loop if comments are closed but using the Custom element and returning the Comment Number works in the loop. Then pick a comment Icon and voilà.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Comments Count on Comments closed post’ is closed to new replies.