I am trying to display recent projects that are on the portfolio page. I've added this code in my project.php file. It displays one image that upload but not the other images and texts that upload to post portfolio.
<?php
$args = array(
'numberposts' => 6,
'post_type' => 'portfolio',
'orderby' => 'post_date',
'order' => 'ASC',
'post_status' => 'publish',
);
$recent_posts = wp_get_recent_posts( $args, ARRAY_A );
?>
<section id="project" class="recent-clients">
<h4>Recent Projects</h4>
<div class="container cf" style="margin-bottom: 11em;">
<?php if($query-> have_posts() ) : while( $query->have_posts() ) : $query->the_post(); ?>
<div class="col-sm-4 hover hover-first">
<img src="<?php the_post_thumbnail( array(320, 320) );?>
<a href="<?php the_permalink();?>"><div class="mask">
<h2>Battalion1944 Website</h2>
<p>Web Design & Web Development</p>
</div></a>
</div>
<?php endwhile; endif; wp_reset_postdata(); ?>
</div>
</section>