WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Disable "Comments are closed" completely (4 posts)

  1. marjamar
    Member
    Posted 4 years ago #

    Hello. I've been doing some searching here and on the web to see if it is possible to disable all code that has to do with notifications that "Comments are closed". Looks like variants of this problem have been around for awhile, and in my case, I've not found a fix for it. I can adjust the code enough in comments.php to make the notice disappear, but there is still left-overs showing up in posts (not pages) that appear when any specific post url is opened. So far, the only place this poses a problem for me is on my default page, which is a post.

    I hope I'm clear enough here, but just in case I'm not I'll link to my website (business website, OK for anyone to see) using both the root URL and the opening post URL, both are the same page, just one is referenced with "?p=1" as part of the URL and the other isn't.

    The problem is at the bottom.

    No problem at all at the bottom.

    I hope there is a fix for this somehow.

    Thanks for looking.

    -Rodger

  2. mrdthomas
    Member
    Posted 4 years ago #

    Did you remove <?php comments_template(); ?> from your template files?

    Also check out http://codex.wordpress.org/Include_Tags#The_Comments_Template

  3. marjamar
    Member
    Posted 4 years ago #

    I fixed it.

    I just had to delete all the code related to what was to be done if "comments are closed" in comments.php.

    This shouldn't effect using comments, only if comments are closed no notification will be offered in any page or post. This should work OK for me, perhaps it will for others as well.

    Here is the actual code I deleted.

    <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>
    </div>

    It can be found between:

    <!-- If comments are closed. -->

    and

    <?php endif; ?>
    <?php endif; ?>

    Hope this helps someone else.

    -Rodger

  4. marjamar
    Member
    Posted 4 years ago #

    I added a new page to my website and decided to enable comments to this page, but it turns out that although I thought comments would visible and usable, obviously the code I removed is prohibiting this. To be sure it that and not something else, I'm going to put this code back and give it a test. I'll post back later with results.

    I would really be nice if those who are responsible for this code would just add another checkbox option to disable all code used for "Comments are closed."

    -Rodger

Topic Closed

This topic has been closed to new replies.

About this Topic