Turn off Comments selectively (per post) (4 posts)

  1. catman1
    Posted 6 years ago #

    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?

  2. Utkarsh Kukreti
    Posted 6 years ago #

    Which theme are you using?
    Disabling the 'Comments are closed' message from the post would require editing of theme files.

  3. mgm_02
    Posted 6 years ago #

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

  4. Ben Kaminski
    Posted 6 years ago #

    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 class="cleared"></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.

Topic Closed

This topic has been closed to new replies.

About this Topic