如何仅在第一级线程注释中显示html代码?
示例一级注释二级注释三级注释一级注释
我有一段html代码,基本上包含“回复(作者姓名)或发表新评论”,只需要在L1评论上显示。
如何仅在第一级线程注释中显示html代码?
示例一级注释二级注释三级注释一级注释
我有一段html代码,基本上包含“回复(作者姓名)或发表新评论”,只需要在L1评论上显示。
您可以在comments循环中执行此操作:
if( empty( $comment->comment_parent ) ) { //if the comment does not have a parent, then it is L1
echo \'my-custom-html\';
}