自定义评论标记

在典型的WordPress主题中,您可以使用wp_list_comments()函数输出帖子/页面的注释的完整列表。 通过自定义为该注释列表生成HTML标记的方式,此功能提供的功能不多。 要为注释列表编写自己的标记,可以在wp_list_comments()中使用回调函数作为参数,因此它也非常抽象。

在functions.php中


   
  • id="li-comment-"> comment_approved == '0') : ?> // Comments markup code here, e.g. functions like comment_text(); } ?>
  • 在comments.php中

    翻译自: https://css-tricks.com/snippets/wordpress/customize-comments-markup/

    你可能感兴趣的:(自定义评论标记)