Limiting Search Page Posts to 10 Per Page from Infinite
-
Hey Guys,
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?
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Limiting Search Page Posts to 10 Per Page from Infinite’ is closed to new replies.