使用get_comments_number()
获取…嗯…评论的数量。在您的主题中comments.php
可以使用其返回值执行以下操作:
$num = (int) get_comments_number();
if ( 0 === $num )
echo \'Be the first! But please don’t write just “First!”\';
elseif ( 100 < $num )
echo \'Yeah, add some noise. Nobody will read it.\';
else
echo \'Please write a comment\';