我想打电话给评论最多的帖子列表。但是对DB的调用总是返回相同的post(循环中的第一个post)
这是我在函数中的代码。php
function lugaresincreibles_most_commented() {
    global $wpdb;
    $pop = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}posts WHERE post_type=\'post\' AND post_status=\'publish\' ORDER BY comment_count DESC LIMIT 3");
    foreach($pop as $post) :
        get_template_part( \'content\', \'featured\' );
    endforeach;
}