WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 http://getsatisfaction.com/wordpress_snippets/topics/show_if_comment_is_in_moderation

share|improve this question

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: http://code.google.com/p/wp-basis-theme/source/browse/trunk/basis/comments.php

share|improve this answer

Your Answer


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