How to code post paginate buttons
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