How do I stop the message "No results could be found matching the search you entered, please check your spelling." appearing when there are results found, which is what is happening on a site I'm building.
Code:
<?php get_header(); ?>
<div id="col-wrapper">
<div id="left-col">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div <?php post_class(); ?>>
<div class="postarea">
<h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<?php the_content("Read More & Compare Prices >"); ?>
<div class="clear"></div>
<?php require(TEMPLATEPATH . '/includes/post-meta-block.php'); ?>
</div>
</div>
<?php endwhile; else: ?>
<?php require(TEMPLATEPATH . '/includes/post-nav-block.php'); ?>
<?php endif; ?>
<div class="postarea">
<h2>Sorry</h2>
<p>No results could be found matching the search you entered, please check your spelling.</p>
<?php require(TEMPLATEPATH . '/includes/post-nav-block.php'); ?>
</div>
</div>
<div id="right-col">
<?php include(TEMPLATEPATH."/sidebar.php");?>
</div>
</div>
<?php get_footer(); ?>
I do want the message to display if no results are found.
Paul
Bookmarks