Everything works well except the date!
It displays the date of the current item.
<?php
$args = array(
'numberposts' => 10,
'offset' => 0,
'category' => 0,
'orderby' => 'post_date',
'order' => 'DESC',
'include' => '',
'exclude' => '',
'meta_key' => '',
'meta_value' =>'',
'post_type' => 'post',
'post_status' => 'draft, publish, future, pending, private',
'suppress_filters' => true
);
$args = array( 'numberposts' => '5' );
$recent_posts = wp_get_recent_posts( $args );
foreach( $recent_posts as $recent ){
?>
<div class="sidebar-child">
<!-- Image de l'article & le lien -->
<a href="<?php echo get_permalink($recent["ID"]); ?>" class="post-thumb preview">
<?php echo get_the_post_thumbnail($recent["ID"]); ?>
</a>
<h4 class="post-title"><a href="<?php echo get_permalink($recent["ID"]); ?>"><?php echo $recent["post_title"]; ?></a></h4>
<span class="glyphicon glyphicon-calendar" aria-hidden="true"></span> <?php echo get_the_date(); ?> <hr>
</div><?php }
wp_reset_query(); ?>
A helping hand for the date