I have an index.php with loop
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
// render post here
<?php endwhile; ?>
<?php endif; ?>
Now I want to limit number of post by N on the page and create
a link to next/previous N posts.
A small code snippet is very appreciated.
UPDATE
What about the URL string? I want to make functionality similar to SO
where query is determined by URL for example
get next twenty questions from the recent
You can achieve that in this way:
References:
http://codex.wordpress.org/Function_Reference/query_posts
http://codex.wordpress.org/Class_Reference/WP_Query