表示している投稿を除いて、同じカテゴリーの投稿を表示する
<?php foreach(get_the_category() as $category) { $thecat = $category->cat_ID; } ?> <?php $args = array( 'cat' => $thecat, 'posts_per_page' => 3, 'post__not_in' => array($post->ID), 'orderby' => rand, ); query_posts($args); ?>