我创建了一个新的walker类,以便在使用wp_list_comments();
功能和这是完美的,唯一的事情是,所有回复一条评论都列在<ul>
- <ul class="children">
. 我想把这些放在<ol>
支架有没有什么方法可以改变这一点start_lvl
?
这是我的学步课-<?php wp_list_comments(\'type=comment&callback=letsfixit_comment\'); ?>
function heres_my_comment($comment, $args, $depth) {
$GLOBALS[\'comment\'] = $comment;
extract($args, EXTR_SKIP);
?>
<li>
<div class="oneComment" id="div-comment-<?php comment_ID() ?>">
<div class="avatIcon pull-left">
<?php if ($args[\'avatar_size\'] != 0) echo get_avatar( $comment, $args[\'avatar_size\'] ); ?>
</div>
<span class="author"><?php printf(__(\'<cite class="fn">%s</cite> <span class="says">says:</span>\'), get_comment_author_link()) ?></span>
<span class="date"><?php /* translators: 1: date, 2: time */ printf( __(\'%1$s at %2$s\'), get_comment_date(), get_comment_time()) ?></a><?php edit_comment_link(__(\'(Edit)\'),\' \',\'\' );?></a></span>
<?php comment_reply_link(array_merge( $args, array(\'add_below\' => $add_below, \'depth\' => $depth, \'max_depth\' => $args[\'max_depth\']))) ?>
<?php if ($comment->comment_approved == \'0\') : ?>
<em class="comment-awaiting-moderation"><?php _e(\'Your comment is awaiting moderation.\') ?></em>
<br />
<?php endif; ?>
<div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>">
</div>
<?php comment_text() ?>
<div class="reply">
</div>
</div>
<?php
}