How to code post paginate buttons
Building+programming By Oddplanet on Wed, Oct 15th, 2025 @ 5:10:02 PM 39 0
It’s always pleasant for your visitors to browse through your posts, what you wrote just before and just after the post in question. Here is the code.
<?php
$prev_post = get_previous_post();
$next_post = get_next_post();
if ($prev_post) {
previous_post_link('%link');
} else {
echo 'Geen oudere post';
}
if ($next_post) {
next_post_link('%link');
} else {
echo 'Geen nieuwere post';
}
?>
Leave a Reply