36 lines
946 B
PHP
36 lines
946 B
PHP
<?php
|
|
// $latest_posts_details = get_field('latest_posts_details');
|
|
?>
|
|
|
|
<section class="section_latest_news">
|
|
<h2 class="section_title">Lastest Articles</h2>
|
|
|
|
<div class="articles_container">
|
|
<?php
|
|
|
|
$recent_posts = wp_get_recent_posts(array(
|
|
'numberposts' => 4, // Number of recent posts thumbnails to display
|
|
'post_status' => 'publish' // Show only the published posts
|
|
));
|
|
|
|
|
|
foreach ($recent_posts as $key => $post) {
|
|
$post_date = date_i18n('j F Y', strtotime($post['post_date']));
|
|
?>
|
|
<div class="article_card">
|
|
<p>qsdqsd</p>
|
|
<?php echo get_the_post_thumbnail($post['ID'], 'full', array('class' => 'article_thumbnail')); ?>
|
|
<div class="card_inner">
|
|
<h4 class="post_date"> <?php echo $post_date ?> </h4>
|
|
<h3 class="post_title"><?php echo $post['post_title'] ?></h3>
|
|
<p><?php echo $post['post_excerpt'] ?></p>
|
|
</div>
|
|
|
|
</div>
|
|
<?php
|
|
}
|
|
|
|
?>
|
|
</div>
|
|
|
|
</section>
|