Answer the question
In order to leave comments, you need to log in
Why after the approval of 1 comment, all the same, subsequent comments from the same user need to be approved by WordPress?
Good afternoon! Maybe someone came across.
The situation is as follows:
in the WordPress settings in the discussions, there are daws "The author must have previously approved comments", "Allow comments on new articles"', "Users must be registered and authorized to comment."
After the first comment is approved, subsequent comments by the same user are "pending review." again.
How can this be removed? Those. if one user comment was approved, then subsequent ones were already published immediately without approval.
The comment code itself:
<?php
if ( post_password_required() )
return;
?>
<div id="comments" class="comments-area">
<?php if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
printf( _nx('Комментарии к статье: 1', ' Комментарии к статье: %1$s', get_comments_number(), 'rybalka' ),
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
?>
</h2>
<ol class="comment-list">
<?php
wp_list_comments( array(
'style' => 'ol',
'short_ping' => true,
'avatar_size' => 50,
'reverse_top_level'=>true,
'reverse_children'=>false,
) );
?>
</ol><!-- .comment-list -->
<?php
// Are there comments to navigate through?
if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
?>
<nav class="navigation comment-navigation" role="navigation">
<div class="nav-previous"><?php previous_comments_link( __( '← Предыдущие комментарии', 'rybalka' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Следующие комментарии →', 'rybalka' ) ); ?></div>
</nav><!-- .comment-navigation -->
<?php endif; // Check for comment navigation ?>
<?php if ( ! comments_open() && get_comments_number() ) : ?>
<p class="no-comments"><?php _e( 'Комментирование закрыто' , 'rybalka' ); ?></p>
<?php endif; ?>
<?php endif; // have_comments() ?>
<?php $args = array('title_reply' => '',
'comment_field' => '<p class="comment-form-comment"><label for="comment">Добавить комментарий:</label><br /><textarea id="comment" name="comment" aria-required="true"></textarea></p>',
'label_submit' => 'Отправить',);
comment_form( $args ); ?>
</div><!-- #comments -->
function rybalka_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
switch ( $comment->comment_type ) :
case 'pingback' :
case 'trackback' :
// Display trackbacks differently than normal comments.
?>
<li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>">
<p><?php _e( 'Pingback:', 'rybalka' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Редактировать комментарий', 'rybalka' ), '<span class="edit-link">', '</span>' ); ?></p>
<?php
break;
default :
// Proceed with normal comments.
global $post;
?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
<article id="comment-<?php comment_ID(); ?>" class="comment">
<header class="comment-meta comment-author vcard">
<?php
echo get_avatar( $comment, 44 );
printf( '<cite><b class="fn">%1$s</b> %2$s</cite>',
get_comment_author_link(),
// If current post author is also comment author, make it known visually.
( $comment->user_id === $post->post_author ) ? '<span>' . __( 'Автор', 'rybalka' ) . '</span>' : ''
);
?>
</header><!-- .comment-meta -->
<?php if ( '0' == $comment->comment_approved ) : ?>
<p class="comment-awaiting-moderation"><?php _e( 'Ваш комментарий ожидает проверки', 'rybalka' ); ?></p>
<?php endif; ?>
<section class="comment-content comment">
<?php comment_text(); ?>
<?php edit_comment_link( __( 'Редактировать комментарий', 'rybalka' ), '<p class="edit-link">', '</p>' ); ?>
</section><!-- .comment-content -->
<div class="reply">
<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Ответить', 'rybalka' ), 'after' => ' <span>↓</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
</div><!-- .reply -->
</article><!-- #comment-## -->
<?php
break;
endswitch; // end comment_type check
}
Answer the question
In order to leave comments, you need to log in
How did you set up the comment system in Wp? Perhaps there is, for example, a restriction on the pass only after 5 approved comments
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question