Wordpress 注释\u number()始终返回零

Wordpress 注释\u number()始终返回零,wordpress,Wordpress,这个标题不言自明。我试图使用WordPress函数comments_number,但它总是返回零,即使有注释。我使用的代码是: <?php comments_number( 'No Comments', '1 Comment', '% Comments' ); ?> 代码是正确的 <?php comments_number( 'No Comments', '1 Comment', '% Comments' ); ?> 这是正确的方法。 正如法典中所确认的: 所以你的问

这个标题不言自明。我试图使用WordPress函数comments_number,但它总是返回零,即使有注释。我使用的代码是:

<?php comments_number( 'No Comments', '1 Comment', '% Comments' ); ?>
代码是正确的

<?php comments_number( 'No Comments', '1 Comment', '% Comments' ); ?>
这是正确的方法。 正如法典中所确认的:

所以你的问题应该在你调用函数的地方。。。通常在content.php文件中执行此操作