Hacking out “Comments are closed” in WordPress

December 21, 2009

StumbleUponTwitterFacebookLinkedInEmail

3d worker - puppet, twisting a nut. Objects ov...

If you use WordPress as your primary web site you may have static pages on which you don’t want site visitors  to add comments. Here is an easy fix (or hack as Sam likes to call them) to edit the obligatory “Comments are closed” text that appears at the bottom of the page.

  1. From your left navigation sidebar go to the “Appearance” drop-down menu and select “Editor“.
  2. Look for the theme stylesheet titled: Comments (comments.php)
  3. Go to your site and copy to your clipboard the unwanted text that is appearing. Typically its something like “Comments are closed”
  4. Go back to the stylesheet and using your Internet browser’s search function search for the unwanted text.
  5. Delete the text and leave a space.

It will  look something like this:

<?php else : // comments are closed ?>
<p>Comments are closed.</p>

Change it to look like this:

<?php else : // comments are closed ?>
<p> </p>

Don’t forget to uncheck “allow comments” in the Discussion box in your page editor.

Happy Blogging!

Random Posts

Leave a Comment

Previous post:

Next post: