I'm trying to limit the amount of posts per page on my website. Currently when you type something in the search bar it lists every post from the beginning of time. I'd like it to be 10. Here's how my code reads:
<?php if (have_posts()) : ?> <div id="left" class="pageContentArea"> <article class="post"> <h1>Results for '<?php the_search_query(); ?>'</h1> <?php include (TEMPLATEPATH . '/_/inc/post/nav.php' ); ?> <?php while (have_posts()) : the_post(); ?> <article <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <div class="entry"> <?php the_excerpt(); ?> </div> </article> <?php endwhile; ?> <?php include (TEMPLATEPATH . '/_/inc/post/nav.php' ); ?>
Do you have any reccommendations on what I need to add in order to achieve this?