I've been stumped for days wondering why when I submit an empty string as a search term, it redirects to part of loop.php where I have the following code inserted:
<?php /* If there are no posts to display, such as an empty archive page */ ?>
<?php if ( !(have_posts()) && !(is_search()) ) : ?>
<h1 class="notfound-header"><?php _e( 'Not Found', 'twentyten' ); ?></h1>
<p class="notfound-content"><?php _e( 'Apologies, but no results were found.', 'twentyten' ); ?></p>
<?php elseif ( !(have_posts()) && (is_search()) ): ?>
<h1 class="notfound-header-search"><?php _e( 'Not Found Search', 'twentyten' ); ?></h1>
<p class="notfound-content-search"><?php _e( 'Apologies, but no results were found.', 'twentyten' ); ?></p>
<?php get_search_form(); ?>
<?php endif; ?>
I'm probably not including the is_search() correctly. But I'm working on this site: http://www.cirkut.net/wp/libertyguide and I want to show the search form when nothing is submitted (i.e. just clicking search from the homepage).
Any ideas as to what to do? Thanks for any help!