Понятия не имею, но не знаю, почему только первый комментарий к любому сообщению показывается в другом порядке, чем один набор.
комментариев. php:
<?php
if( post_password_required() ){
return;
}
comment_form();
if( have_comments() ):
wp_list_comments( array( 'callback' => 'my_comments_callback' ) );
if( !comments_open() && get_comments_number() ):
?>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'sunsettheme' ); ?></p>
<?php
endif;
endif;
?>
функций. php:
function my_comments_callback( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
?>
<!-- Fourth news -->
<div id="<?php comment_ID(); ?>" class="news">
<!-- Excerpt -->
<div class="excerpt">
<!-- Brief -->
<div class="brief">
<a style="margin-left: 0px;" class="name"><?php echo get_comment_author(); ?></a>
<div class="date"><?php echo get_comment_date(); ?></div>
</div>
<!-- Added text -->
<br>
<div class="added-text"><?php comment_text(); ?></div>
</div>
<!-- Excerpt -->
</div>
<!-- Fourth news -->
<hr>
<?php
}
в функциях. php указывается первым:
first name
date
content
но они в первом комментарии показываются
content
date
first name
но почему?