WordPress.org

Support

Support » Themes and Templates » Comments (No Comments)

Comments (No Comments)

  • I am looking for a way to hide the comments total if there are 0 comments.

    The reason for this is that I am using the WP instance as a CMS system to host media… there are mainly pages, but all media contents are in post form. I want comments to only be allowed on the media posts and not on the pages.

    I see:

    <ul class="controls">
      <li class="comments"><?php comments_number('Comments(0)', 'Comments(1)','Comments(%)'); ?></li>
    </ul>

    Is there a better way to do this? (ps… When I disable comments on the pages, it DOES still show the comment total… I commented out the area where is says:
    <p class="nocomments">Comments are closed.

    Thank you,
    Wes

  • The topic ‘Comments (No Comments)’ is closed to new replies.