Note that there are some explanatory texts on larger screens.

plurals
  1. POWordPress 'comment is awaiting moderation.' message not appearing when a comment is submitted?
    primarykey
    data
    text
    <p>Everything is pretty standard from WP samples, with minor modifications. But when a comment is submitted, it does not show the "your comment is awaiting moderation" message.</p> <p>The comments.php:</p> <pre><code> &lt;div id="comment-block"&gt; &lt;h4&gt;&lt;?php comments_number('No Responses', 'One Response', '% Responses' );?&gt; to &amp;#8220;&lt;?php the_title(); ?&gt;&amp;#8221;&lt;/h4&gt; &lt;ul id="commentlist"&gt; &lt;?php wp_list_comments('type=comment&amp;callback=mytheme_comment'); ?&gt; &lt;/ul&gt; &lt;?php // this is displayed if there are no comments so far ?&gt; &lt;?php if ('open' == $post-&gt;comment_status) : ?&gt; &lt;!-- If comments are open, but there are no comments. --&gt; &lt;?php else : // comments are closed ?&gt; &lt;!-- If comments are closed. --&gt; &lt;p class="nocomments"&gt;Comments are closed.&lt;/p&gt; &lt;?php endif; ?&gt; &lt;?php if ('open' == $post-&gt;comment_status) : ?&gt; &lt;h4&gt;Leave a reply&lt;/h4&gt; &lt;div class="cancel-comment-reply"&gt; &lt;small&gt;&lt;?php cancel_comment_reply_link(); ?&gt;&lt;/small&gt; &lt;/div&gt; &lt;?php if ( get_option('comment_registration') &amp;&amp; !$user_ID ) : ?&gt; &lt;p&gt;You must be &lt;a href="&lt;?php echo get_option('siteurl'); ?&gt;/wp-login.php?redirect_to=&lt;?php echo urlencode(get_permalink()); ?&gt;"&gt;logged in&lt;/a&gt; to post a comment.&lt;/p&gt; &lt;?php else : ?&gt; &lt;form action="&lt;?php echo get_option('siteurl'); ?&gt;/wp-comments-post.php" method="post" id="commentform"&gt; &lt;?php if ( $user_ID ) : ?&gt; &lt;p class="loggedIn"&gt;Logged in as &lt;a href="&lt;?php echo get_option('siteurl'); ?&gt;/wp-admin/profile.php"&gt;&lt;?php echo $user_identity; ?&gt;&lt;/a&gt;. &lt;a href="&lt;?php echo wp_logout_url(get_permalink()); ?&gt;" title="Log out of this account"&gt;Log out &amp;raquo;&lt;/a&gt;&lt;/p&gt; &lt;?php else : ?&gt; &lt;table width="675" cellpadding="0" cellspacing="0" border="0"&gt; &lt;tr&gt;&lt;td style="padding-right: 20px;"&gt;&lt;label for="author"&gt;Name &lt;?php if ($req) echo "(required)"; ?&gt;&lt;/label&gt;&lt;/td&gt; &lt;td style="padding-right: 20px;"&gt;&lt;label for="email"&gt;Email &lt;?php if ($req) echo "(required)"; ?&gt;&lt;/label&gt; &lt;small&gt;(will not be published)&lt;/small&gt;&lt;/td&gt; &lt;td&gt;&lt;label for="url"&gt;Website &lt;?php if ($req) echo "(required)"; ?&gt;&lt;/label&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;&lt;td style="padding-right: 20px;"&gt;&lt;input type="text" name="author" id="author" value="&lt;?php echo $comment_author; ?&gt;" class="text" tabindex="1" &lt;?php if ($req) echo "aria-required='true'"; ?&gt; /&gt;&lt;/td&gt; &lt;td style="padding-right: 20px;"&gt;&lt;input type="text" name="email" id="email" value="&lt;?php echo $comment_author_email; ?&gt;" class="text" tabindex="2" &lt;?php if ($req) echo "aria-required='true'"; ?&gt; /&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="text" name="url" id="url" value="&lt;?php echo $comment_author_url; ?&gt;" class="text" tabindex="3" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;?php endif; ?&gt; &lt;label for="comment"&gt;Comment &lt;?php if ($req) echo "(required)"; ?&gt;&lt;/label&gt;&lt;br /&gt; &lt;textarea name="comment" id="comment" rows="10" tabindex="4" class="text"&gt;&lt;/textarea&gt; &lt;input name="submit" type="image" src="&lt;?php bloginfo('template_directory'); ?&gt;/images/submit_button.png" width="130" height="24" alt="Submit" id="submit" tabindex="5" /&gt; &lt;?php comment_id_fields(); ?&gt; &lt;?php do_action('comment_form', $post-&gt;ID); ?&gt; &lt;/form&gt; &lt;div class="clear"&gt;&lt;/div&gt; &lt;?php endif; // If registration required and not logged in ?&gt; &lt;/div&gt; &lt;?php endif; // if you delete this the sky will fall on your head ?&gt; </code></pre> <p>And the mytheme_comments function in functions.php</p> <pre><code> function mytheme_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?&gt; &lt;li &lt;?php comment_class(); ?&gt; id="li-comment-&lt;?php comment_ID() ?&gt;"&gt; &lt;div id="comment-&lt;?php comment_ID(); ?&gt;"&gt; &lt;span class="comment-author vcard"&gt; &lt;?php printf(__('&lt;cite class="fn"&gt;%s&lt;/cite&gt; &lt;span class="says"&gt;says at&lt;/span&gt;'), get_comment_author_link()) ?&gt; &lt;/span&gt; &lt;?php if ($comment-&gt;comment_approved == '0') : ?&gt; &lt;em&gt;&lt;?php _e('Your comment is awaiting moderation.') ?&gt;&lt;/em&gt; &lt;br /&gt; &lt;?php endif; ?&gt; &lt;span class="comment-meta commentmetadata"&gt;&lt;a href="&lt;?php echo htmlspecialchars( get_comment_link( $comment-&gt;comment_ID ) ) ?&gt;"&gt; &lt;?php printf(__('%2$s, %1$s'), get_comment_date(), get_comment_time()) ?&gt;&lt;/a&gt;&lt;?php edit_comment_link(__('(Edit)'),' ','') ?&gt;&lt;/span&gt; &lt;?php comment_text() ?&gt; &lt;div class="reply"&gt; &lt;?php comment_reply_link(array_merge( $args, array('depth' =&gt; $depth, 'max_depth' =&gt; $args['max_depth']))) ?&gt; &lt;/div&gt; &lt;/div&gt; &lt;?php } ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload