WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. sahaara
    Member
    Posted 4 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
    Member
    Posted 4 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
    Member
    Posted 4 years ago #

    ok.thanq

  4. Gouri
    Member
    Posted 4 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
    Member
    Posted 3 years ago #

    @gouri

    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