[resolved] Do not display comment form if comments are closed (5 posts)

  1. sahaara
    Posted 6 years ago #

    Comment form is being displayed even when comments are closed.
    Form should be displayed only when comment-status is open.What are the changes that should be done in the code of comments.php ?

  2. ryans149
    Posted 6 years ago #

    <?php if ( comments_open() ) : ?>
    		<!-- If comments are open, but there are no comments. -->
    	 <?php else : // comments are closed ?>
    		<!-- If comments are closed. -->
    		<p class="nocomments">Comments are closed.</p>
  3. sahaara
    Posted 6 years ago #


  4. Gouri
    Posted 6 years ago #

    Comments are being closed on my site but "comments are closed" notification is not being displayed. What should I do?

  5. k_nitin_r
    Posted 5 years ago #


    I know my response is late, but just in case you've checked the "Notify me of followup posts via e-mail" option, you might want to check if the theme contains code that conditionally displays the "comments are closed" notification. If you can post the name of the theme you are using, we can look it up for you.

Topic Closed

This topic has been closed to new replies.

About this Topic