我正在制作一个自定义评论模板,我不希望使用列表来显示评论。
默认情况下,WordPress会将以下内容放在每条评论的末尾:
</li><!-- #comment-## -->
我知道我可以破解核心wp-includes/comment-template.php
, 但这将使我无法正常更新。有没有办法删除这个?以下是我的函数回调:
<section id="li-comment-<?php comment_ID(); ?>">
<article id="comment-<?php comment_ID(); ?>" class="comment <?php if ($comment->comment_author_email == get_the_author_email()) { echo \'author-comment\'; } ?>">
<div class="comment-content">
<aside class="comment-gravatar">
<?php echo get_avatar($comment, \'50\'); ?>
</aside>
<?php comment_text(); ?>
</div>
<div class="comment-data">
<div class="comment-author">
<p>Posted by : <?php echo get_comment_author(); ?></p>
<p>On <?php the_time(\'l, F jS, Y\') ?> at <?php the_time() ?></p>
</div>
<div class="comment-reply">
<?php comment_reply_link( array_merge( $args, array( \'reply_text\' => \'Reply to Comment\', \'depth\' => $depth, \'max_depth\' => $args[\'max_depth\'] ) ) ); ?>
</div>
</div>
</article>
</section>