Pages not linking in correct order
-
Hi,
I have added the code in my pages and it works a treat, but the pages are not linking in order. I have ordered the pages within the WordPress interface, 1 – 12, but the pages between themselves link in a random order. What am I doing wrong? Have played around with the code but can’t seem to fix it.
The code:
<?php
$nextPage = next_page_not_post(‘next project →’, ‘true’, ‘sort_column=post_date&sort_order=desc’);
$prevPage = previous_page_not_post(‘← previous project’, ‘true’, ‘sort_column=post_date&sort_order=desc’);
if (!empty($nextPage) || !empty($prevPage)) {
echo ‘<ul id=”postnav”>’; if (!empty($nextPage)) echo ‘<li class=”next”>’.$nextPage.”;
if (!empty($prevPage)) echo ‘<li class=”previous”>’.$prevPage.”;
echo ”;
}
?>
- The topic ‘Pages not linking in correct order’ is closed to new replies.