• Hi,

    I installed the P2 theme and enabled comment moderation. Now when a new comment is posted, it is not shown until it is approved. Usually the user can see his comment with the message “Your comment is awaiting moderation”. Looking at the code (and comparing with another theme), in comments.php, I replaced this line”

    <?php if ( get_comments_number() > 0 ) : ?>

    with

    <?php if ( have_comments() ) : ?>

    and comments that are put in moderation show up.

    Was there any particular reason for using get_comments_number() > 0 instead of have_comments()? Is it safe to use have_comments()? That reason I’m asking is I’m not familiar with wordpress or the p2 codebase and don’t want to introduce any problems in my install.

Viewing 6 replies - 1 through 6 (of 6 total)
  • I have the same problem “Your comment is awaiting moderation” is not showing?

    Not sure if it wise to change the code, has it effected anything else?

    Just noticed it still shows the comment when you refresh the page? Even tho the message is in the moderation section withing admin?

    I see what happening now !

    No message appears such as “Your comment is awaiting moderation”
    But if you refresh the page the commentor can see there message.

    THis goes in to admin panel for moderation.

    Someone on another computer does not see the message until it is approved.

    Thanks for the report. The intended behavior is just like any other theme—the comment should appear with the appropriate message in place. We’ll take a look and get it fixed up.

    Thread Starter digTro

    (@digtro)

    @lance, thanks for replying.

    I had made some code changes in my P2 install and they fixed the issue. Here is the code diff: https://pastebin.com/PabAVig6. Maybe it will help you guys.

    i am having same problem after submit comments this message not showing !

    “Your comment is awaiting moderation”

    please find any solution !

    plz…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Showing comments that are put in moderation’ is closed to new replies.