WordPress.org

Support

Support » How-To and Troubleshooting » Turn off Comments selectively (per post)

Turn off Comments selectively (per post)

  • I’m using WP 2.9. In the admin, when I create a post and uncheck “Allow Comments” at the bottom of the editing page, my present theme shows a “No Comments” button at the bottom of the resulting post on my site, and when a viewer clicks it, (s)he gets to the page saying “Comments are closed”. Is there a way that, when I have selected not to allow comments on a given post (not all posts) I can prevent the “No Comments” button (and the “Comments are closed” message, too) from appearing at all?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Which theme are you using?
    Disabling the ‘Comments are closed’ message from the post would require editing of theme files.

    Hello, i have no comments section on the bottom of the page, is this normal?

    I found this rather easy to accomplish. In your theme folder find “comments.php” and open it in a text editor.

    Find this code:

    <?php else : // comments are closed ?>
    		<!-- If comments are closed. -->
    <div class="Post">
        <div class="Post-tl"></div>
        <div class="Post-tr"><div></div></div>
        <div class="Post-bl"><div></div></div>
        <div class="Post-br"><div></div></div>
        <div class="Post-tc"><div></div></div>
        <div class="Post-bc"><div></div></div>
        <div class="Post-cl"><div></div></div>
        <div class="Post-cr"><div></div></div>
        <div class="Post-cc"></div>
        <div class="Post-body">
    <div class="Post-inner article">
    
    <div class="PostContent">
    
    <p class="nocomments"><?php _e('Comments are closed.', 'kubrick'); ?></p>
    
    </div>
    <div class="cleared"></div>
    
    </div>
    
        </div>

    From “div class post” on down, delete everything and save. This will remove the message about comments being closed as well as the box that it shows up in.

    … of course, not everyone’s comments.php file will look the same, but hopefully you get the gist of it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Turn off Comments selectively (per post)’ is closed to new replies.