以防万一,如果您没有签出plugin developers page 但你可以试试看
if (function_exists(ckrating_get_comments)) {
$post_id = $post->ID;
$mycomments = ckrating_get_comments(
"post_id=$post_id&status=approve&
orderby=comment_karma&order=DESC");
}
else
$mycomments = null;
wp_list_comments(array(), $mycomments);
UPDATE
我让它在函数中工作。phpI让它在函数中工作。php `函数注释\\u比较器($a,$b)
function comment_comparator($a, $b)
{
$compared = 0;
if($a->comment_karma != $b->comment_karma)
{
$compared = $a->comment_karma < $b->comment_karma ? 1:-1;
}
return $compared;
}
和在评论中。php
global $wp_query;
$comment_arr = $wp_query->comments;
usort($comment_arr, \'comment_comparator\');
wp_list_comments(\'callback=gtcn_basic_callback\', $comment_arr);
在此上找到
website