<?php
$args = array(
'post_type' => 'post', // 投稿タイプ
'category_name' => 'uncategorized', // カテゴリ名(スラッグ)
'posts_per_page' => 5, // 表示件数
);
$new_query = new WP_Query($args);
?>
<?php if ($new_query->have_posts()) : ?>
<?php while ($new_query->have_posts()) : $new_query->the_post(); ?>
<!-- 繰り返し処理する内容 -->
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
<?php else : ?>
<!-- 取得できない場合に処理する内容 -->
<?php endif; ?>