I would like to know how to know if the next article is the most recent ? And if is not the most recent, dont' show the content (The right arrow and "Article suivant") please,
Here is my current code :
For next :
<?php
$next_post = get_next_post();
if (!empty( $next_post )): ?>
<a href="<?php echo esc_url( get_permalink( $next_post->ID ) ); ?>"><?php echo esc_attr( $next_post->post_title ); ?></a>
<?php endif; ?>
For previous :
<?php
$prev_post = get_previous_post();
if (!empty( $prev_post )): ?>
<a href="<?php echo $prev_post->guid ?>"><?php echo $prev_post->post_title ?></a>
<?php endif ?>
Thank you every one !!