Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

How to display a moderation-message with a comment after posting a comment.

The workflow should be:

  • post a comment

  • wp thinks this one has to be moderated

  • user sees his comment with a messe like "thx but you cannot see it since its in moderation"

  • stretchgoal: this message should be visible every time the users visits (cookie?)

  • the messages disapears when the comment gets deleted or approved

Is there a way to do this? Thanks

ps: this is a crosspost from

share|improve this question

1 Answer 1

use the follow var: $comment->comment_approved and check for the value

<?php if (0 == $comment->comment_approved) { ?>
       <em><?php _e('Your comment must approved.', FB_BASIS_TEXTDOMAIN) ?></em>
<?php } ?>

code example:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.