WordPress.org

Ready to get started?Download WordPress

Forums

remove "Comments are closed." text (9 posts)

  1. MingisFawn
    Member
    Posted 9 years ago #

    I've got all comments turned off, and I would like to either completely remove the "Comments are closed." text that appears at the bottom of the single post page, or in the alternative, replace it with something thats almost as good, like a period. This is not being generated by anything in the loop specifically, but seems to be coming from wherever it is that the whole get content process is defined. I've checked most of the .php files in the WP installation for this text string to no avail.

    Any suggestions? Thanks in advance for a point in the right direction. :)

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    } elseif ( 'closed' == $post_status ) {
    do_action('comment_closed', $comment_post_ID);
    die( __('Sorry, comments are closed for this item.') );
    }

    wp-comment-post.php, right at the top.

  3. MingisFawn
    Member
    Posted 9 years ago #

    Only thing is, the piece you mentioned there has the text

    "Sorry, comments are closed for this item."

    which is not the same as the text I wish not to display. It says only

    "Comments are closed."

    I changed your recommended string to "I like toast.", uploaded, and refreshed the page. As I had suspected, this is not the string I'm looking for. Thank you for trying though!

  4. Mark (podz)
    Support Maven
    Posted 9 years ago #

    <?php else : // comments are closed ?>
    <!-- If comments are closed. -->
    <p class="nocomments">Comments are closed.</p>

    Line 56
    comments.php

  5. MingisFawn
    Member
    Posted 9 years ago #

    Ty very much! This is precisely what I was looking for. Silly me, I didnt even think of checking the default templates for this. :)

  6. Harvey
    Member
    Posted 8 years ago #

    I was looking for the same and found my answer here. Good thread!

  7. stonegauge
    Member
    Posted 8 years ago #

    Just wondering if there was a way to specifically disable this messag for PAGES? Thanks... Also, where would I edit this on 2.0? I've searched comments.php and the line "Comments are closed." isn't found there.

  8. moshu
    Member
    Posted 8 years ago #

    If you have a page.php template for your theme - you can remove it permanently, since usually Pages are not meant to be commented.
    You can save your theme's index.php file as page.php and edit as you like it.

  9. stonegauge
    Member
    Posted 8 years ago #

    thansk Mosh. That'll work

Topic Closed

This topic has been closed to new replies.

About this Topic