joynic
2011-12-06 17:55:04 +08:00
$num_comments = get_comments_number(); // for some reason get_comments_number only returns a numeric value displaying the number of comments
$num_comments_goal = 50;
if ( comments_open() ){
if($num_comments == 0){
$comments = __('No Comments');
}
elseif($num_comments >= $num_comments_goal){
$comments = $num_comments. __('Comments');
}
elseif($num_comments > 1){
$comments = '离'.$num_comments_goal.'条评论还有'.($num_comments_goal -$num_comments). '条';
}
else{
$comments ="1 Comment";
}
$write_comments = '<a href="' . get_comments_link() .'">'. $comments.'</a>';
}
else{$write_comments = __('Comments are off for this post');}
这样行不通。。。求帮助。