人気記事をよくあるプラグインを使わずに任意の箇所に表示させる小技(テキストのみ) 表示させたい場所に以下のphpを記述します。 <ul class="popular-posts"> <?php $result = $wpdb->get_results("SELECT comment_count,ID,post_title FROM $wpdb->posts ORDER BY comment_count DESC LIMIT 0 , 6"); //表示させたい件数 foreach ($result as $post) { setup_postdata($post); $postid = $post->ID; $title = $post->post_title; $commentcount = $post->comment_count; if ($commentcount != 0) { ?