سلام
<?php
$wp= new WP_Query(array(
'post_type' => 'post',
'post_status' => 'publish',
'category__in' => wp_get_post_categories( $post->ID ),
'order' => 'DESC',
'orderby' => 'id',
'posts_per_page' =>'1',
'showposts' => '1',
));
?>
<li>مطلب</li>
<?php endwhile;endif ;wp_reset_query();?>
از کد بالا برای ساخت حلقه category.php استفاده میکنید؟