Question on search results page
-
I’m working on my search results page (the base of which is off the default wordpress theme). How do I get all my search results to appear in a list in one page, instead of having ‘Previous Entries’ and ‘Next Entries’ links to get each returned result? This is how it looks like at the moment:
<div id="content" class="narrowcolumn"><?php if (have_posts()) : ?>
<h2 class="pagetitle">Search Results</h2>
<?php while (have_posts()) : the_post(); ?>
<div class="post">
<small class="posttime"><?php the_time('l, F jS, Y') ?></small>
<h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
</div><?php endwhile; ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Next Entries »') ?></div>
</div><?php else : ?>
<h2 class="center">No posts found. Try a different search?</h2>
<?php include (TEMPLATEPATH . '/searchform.php'); ?><?php endif; ?>
</div>
Thanks in advance.
- The topic ‘Question on search results page’ is closed to new replies.