• I really want to display a message to commenters who leave a comment that has been marked as spam by the system. A message similar to the “your comment is awaiting moderation” but that would say instead: “there’s a problem with your comment – it has been marked as spam”.

    This is the code that I use to display the awaiting moderation message:

    <?php if ($comment->comment_approved == ‘0’) : ?>
    <div>
    <?php _e(‘Your comment is awaiting moderation, when it is approved it will appear here permanently.’) ?>
    </div>
    <?php endif; ?>

    Can it be modified to display a “your comment is spam” message?

Viewing 2 replies - 1 through 2 (of 2 total)
  • <?php _e('Your comment is awaiting moderation, when it is approved it will appear here permanently.') ?>

    just change this line to

    <?php _e('there's a problem with your comment - it has been marked as spam') ?>

    or similar

    Thread Starter benjamin_sp

    (@benjamin_sp)

    Samboll, that’s just changing the message. The line before that still detects if the comment is being held in moderation:

    <?php if ($comment->comment_approved == ‘0’) : ?>

    I need to know what line detects if the comment has been marked as spam. That’s what I was asking for.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display a “You comment has been marked as Spam” Message’ is closed to new replies.