回复内容: 最好是系统函数 而不是数据库调用
据我所知,没有这个函数。需要自己去写。
可以在
wp-includes/comment.php
增加一个funciton
function get_first_approved_comment($post_id) { global $wpdb; return $wpdb->get_results($wpdb->prepare(select * from $wpdb->comments where comment_post_id = %d and comment_approved = '1' order by comment_date desc limit 1, $post_id));}