How to Remove, “Comments are Closed” Message in WordPress

December 29, 2009

in WordPress

comments-are-closedThere are WordPress blogs out there that have comments disabled on all posts except a few selected ones where visitors can post comments to. These selected posts which have comments enabled are either open to comments for an indefinite period of time or for a specified number of days after which they are closed. WordPress by default shows the message ‘Comments are closed.’ even on posts which were never open for comments. This behavior might not be liked, however, users can choose to disable this message and make it appear only on posts which were once or still are open to comments. The procedure outlined below assumes that the structure of the comments.php file is based on the file found inside the default WordPress theme.

Following are the steps that are required to make the modification:

  • Go to your theme’s folder (located under /wp-content/themes/) and make a backup of the comments.php file
  • Open the comments.php file for editing
  • Locate the following lines of code and remove them:

<?php if (‘closed’ == $post->comment_status) : ?>
<p>Comments are closed.</p>
<?php endif; ?>

  • Find the following lines of code:

<?php else : // comments are closed ?>
<!– If comments are closed. –>

  • Right after those lines, add the following line of code:

<p>Comments are closed.</p>

  • Save and close the file.

You are done…

Hope this blog post was helpful to you, How to Remove, “Comments are Closed” Message in WordPress

Spunky Jones.

Comments on this entry are closed.