The Excerpt gets page excerpt instead of most recent post excerpt

Your problem is that you’re using $recent_posts as your variable name. If setup_postdata() isn’t working, then your the_excerpt() should return whatever the excerpt is of the current page.

From the setup_postdata() codex page:

You must pass a reference to the global $post variable, otherwise functions like the_title() don’t work properly.

So change this:

$args = array( 'numberposts' => '1','post_type' => 'post' );
$recent_posts = wp_get_recent_posts( $args );
foreach( $recent_posts as $recent ) : setup_postdata($recent);

To this:

global $post;
$args = array( 'numberposts' => '1','post_type' => 'post' );
$recent_posts = wp_get_recent_posts( $args );
foreach( $recent_posts as $post ) : setup_postdata($post);

Better yet, use WP_Query which is perfect for secondary loops!

$args = array( 'posts_per_page' => '1','post_type' => 'post' );
$recent_posts = new WP_Query( $args );
if( $recent_posts->have_posts() ) : while( $recent_posts->have_posts() ) : $recent_posts->the_post();

And replace endforeach; with endwhile; endif;


Bonus best practice, never use page-{anything}.php for a template name as that’s a reserved pattern in the template hierarchy. For a static front page, use front-page.php instead.)