Showing comments that are put in moderation
-
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 ofhave_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.
- The topic ‘Showing comments that are put in moderation’ is closed to new replies.