в functions.php добавить
function my_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment; ?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
<div id="comment-<?php comment_ID(); ?>" class="comment-wrap">
<div class="comment-head comment-author vcard"><?php
echo get_avatar( $comment, 60 );
echo get_comment_author();
if ( comments_open() ){
comment_reply_link(
array_merge(
$args,
array(
'depth' => $depth,
'max_depth' => $args['max_depth'],
'reply_text' => __( 'Ответить' )
)
)
);
}?>
<div class="comment-meta commentmetadata">
<div class="comment-date"><?php
/* translators: 1: date, 2: time */
printf( __( '%1$s в %2$s' ),
get_comment_date(),
get_comment_time()
); ?>
</div><?php
edit_comment_link( __( 'Правка' ), '', '' );?>
</div>
</div>
<div class="comment-content comment-text"><?php
if ( $comment->comment_approved == '0' ) { ?>
<em><?php _e( 'Ваш комментарий ожидает проверки'); ?></em><br /><?php
}
comment_text(); ?>
</div>
</div>
<?php
}
в comments.php заменить wp_list_comments на
<?php wp_list_comments( array( 'callback' => 'my_comment' , 'style' => 'ol')); ?>
-
Ответ изменён 5 лет, 1 месяц назад пользователем Yui. Причина: для оформления кода есть соотв. кнопочка code