• Hello,

    How can I hide comments if they are zero and show them only if they are one or more? I don’t want to show ‘No comments’ if there aren’t any.

    Thanks

    <gwmw style=”display:none;”></gwmw>

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi
    Because Twenty Twenty-Four is a block theme, it uses the comments block to show the comments area.

    WordPress does not have a built-in option for showing or hiding blocks conditionally. You would need to try yo find and install a plugin to do this.

    The comments title block shows the text “X Responses” or “One response”. When there are no comments, the block does not display anything. This is already the built-in behavior. There is no text string in the theme that says “No comments”.

    Thread Starter sysguides

    (@sysguides)

    I apologize for being unclear about what I am talking about. I was referring to the number of comments just below the main title of the article in the post meta (Comments Link Block).

    • This reply was modified 1 year, 1 month ago by sysguides.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide ‘No comments’’ is closed to new replies.