I'm trying to build a function where the visitor can select the number of posts shown per page like this:
Where do I start and how do I achieve this? I am currently using query_post to list all the posts:
<?php
$paged = 1;
query_posts(array( 'showposts'=> 10, 'post_type' => 'post', 'category_name' => 'jobseeker-announcements', 'order' => 'DESC', 'posts_per_page' => 10, 'paged' => get_query_var('paged'))); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post-list">
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<p class="datetime"><span>Date Posted:</span> <?php the_time('m/j/Y'); ?></p>
<p><?php the_excerpt(); ?></p>
<!--/post-list--></div>
<?php endwhile; ?>
May be it's perfect code for your solution.
Use jquery
change
function.