Forums

Easiest way to temporarily turn off comments for existing posts (7 posts)

  1. Christiaan
    Member
    Posted 3 years ago #

    What's the easiest way to temporarily turn off comments for existing posts (v2.0.4)?

  2. samboll
    moderator
    Posted 3 years ago #

    admin -> Options -> Discussion
    Uncheck box for "Allow people to post comments on the article"

  3. Christiaan
    Member
    Posted 3 years ago #

    That only appears to turn off comments for articles published from that point onwards. I want to know how to temporarily turn off the ability to further comment on existing articles (without hiding the comments already made).

  4. Kafkaesqui
    Moderator
    Posted 3 years ago #

  5. Christiaan
    Member
    Posted 3 years ago #

    Thanks, that does the trick. Pity it doesn't hide the comments form though. I hate to think of people writing a comprehensive repiy only to be told comments are not being accepted.

  6. Otto42
    Moderator
    Posted 3 years ago #

    Quick and extremely dirty way:
    Edit your comments.php file in your theme.
    At the top, just after the "<?php" line, add this line:
    $post->comment_status = 'closed';

    This won't actually prevent commenting, but it will hide the comment form.

    Remove the line later.

  7. Christiaan
    Member
    Posted 2 years ago #

    Thanks Otto.

Topic Closed

This topic has been closed to new replies.

About this Topic