I have an index.php page that is only displaying 1 post at a time with a query.
(found this code online, but it does work)
$page = (get_query_var('paged')) ? get_query_var('paged') : 1;
// if we are paging
if ($page == 1) {
query_posts('order=DESC&posts_per_page=1&paged=$page');
} else {
$numposts = get_option('posts_per_page');
// work out offset
$offset = (($page -1) * $numposts); // i.e. page 2 - 1 = 1 * 10 (10 for the number of posts)
query_posts("&order=DESC&offset=$offset&paged=$page&showposts=$numposts");
}
This correctly shows one post per page, and it displays the navigation on the bottom of my template when I put a <?php posts_nav_link(); ?>
in there.
Is there anyway to change the "Next Page" and "Previous Page" links to be the titles of the posts themselves?