WordPress is a free and open-source content management system written in PHP and paired with a MySQL or MariaDB database.
<?php
$recent_posts = wp_get_recent_posts(array(
‘numberposts’ => 2, // Number of recent posts thumbnails to display
‘post_status’ => ‘publish’ // Show only the published posts
));
foreach($recent_posts as $post) : ?>
<center> <a href=”<?php echo get_permalink($post[‘ID’]) ?>”>
<h2 class=”entry-title”><?php echo $post[‘post_title’] ?></h2>
<?php echo get_the_post_thumbnail($post[‘ID’], ‘full’); ?>
</a></center>
<?php endforeach; wp_reset_query(); ?>
output