Код
<?php
$next_post = get_adjacent_post( false, '', false);
$next_post_url = get_the_permalink($next_post);
$previous_post = get_adjacent_post( false, '', true);
$previous_post_url = get_the_permalink($previous_post);
?>
<a href="<?php echo $next_post_url;?>">Next post</a>
<a href="<?php echo $previous_post_url;?>">Previous post</a>
Custom Post Type Next/Previous Link





