How can I get the link and title of both next and previous post on the single page? Just like in the screenshot below.
I try to use this but nothing shows up.
$prev = get_previous_post(); $next = get_next_post(); $prev_title = $prev ? get_the_title($prev) : 'Current is First Post'; $next_title = $next ? get_the_title($next) : 'Current is Last Post';
Thank you so much.