这是我现在的代码,可以从wordpress wp_post表中获得热门的帖子。我如何排除3或4等类别?如何排除SQL语句中的某个类别
$popularposts = "SELECT ID,post_title FROM {$wpdb->prefix}posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY comment_count DESC LIMIT 0,".$pop_posts;
$posts = $wpdb->get_results($popularposts);
这将有助于查看wp_post – Dave 2011-02-23 16:19:46