WordPress.org

Ready to get started?Download WordPress

Forums

Comments (No Comments) (1 post)

  1. wescrock
    Member
    Posted 6 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic