カスタムループ(get_posts)
<?php
$args = array('post_type' => 'post','posts_per_page' => 5);
$my_posts = get_posts( $args );
if( !empty( $my_posts ) ) : //もし記事が空でなかったら
?>
<section class="news">
<?php foreach ( $my_posts as $post ) : setup_postdata( $post ); ?>
<time class="time" datetime="<?php the_time('Y-m-d'); ?>"><?php the_time('Y.m.d'); ?></time>
<?php endforeach; ?>
</section>
<?php else: ?>
<?php endif; wp_reset_postdata(); ?>