Code: Select all
echo'<div class="row">';
$previousPageKey = $page->previousKey();
$previousPage = buildPage($previousPageKey);
$nextPageKey = $page->nextKey();
$nextPage = buildPage($nextPageKey);
echo'<div class="six columns center-text">';
echo '<p class="title">Next post: <br/> ';
if ($page->nextKey()) {
echo'∙ <a href="'.$nextPage->permalink().'">'.$nextPage->title().'</a>';
echo'<div class="hovering-button left"><a href="'.$nextPage->permalink().'" >«</a></div>';
} else {
echo 'Hold your horses, this is the latest post';
}
echo'</p>';
echo'</div>';
echo'<div class="six columns center-text">';
echo '<p class="title">Previous post: <br/> ∙ ';
if ($page->previousKey()){
echo'<a href="'.$previousPage->permalink().'">'.$previousPage->title().'</a>';
echo'<div class="hovering-button right"><a href="'.$previousPage->permalink().'" >»</a></div>';
} else {
echo ' No more posts. You reached the end.';
}
echo'</p>';
echo'</div>';
echo'</div>';