I got my search to work thankfully but I'm still working out the archive issue and a few minor things with the search page. Below is the code I used to solve the problem I was having:
<?php /** * The template for displaying Search Results pages. * * @package WordPress * @subpackage Starkers * @since Starkers 3.0 */
get_header(); ?>
<div id="search-wrap"> <img src="http://grafxcreative.com/successjustclicks/wp-content/themes/sjc/images/blog.jpg"> <div id="search-wrap2" align="left">
<?php if ( have_posts() ) : ?>
<?php $searchquery = trim( get_search_query() ); if ( !empty($searchquery) ) { printf( __( '<h1>Search Results for: %s', 'twentyeleven' ), '<span>' . get_search_query() . '</span></h1>' ); } else
{ echo "<h2>Oops - you didn't specify a search term</h2>";
$searchquery = trim( get_search_query() ); echo "<p>Please try searching again by entering one or two words on the subject that you are trying to find more information on.</p>";
} ?>
<?php if( function_exists('search_results_title') ): ?> <h3 class="section-title"><?php search_results_title(); ?></h3> <?php else: ?> <?php endif; ?>
<?php query_posts($query_string
. '&showposts=10'); ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php $searchquery = trim( get_search_query() ); if ( !empty($searchquery) ) { ?> <div class="search-result"> <span class="search-header"><a class="two" href="<?php the_permalink();
?>"><?php the_title(); ?></span>
<p2><?php the_excerpt(); ?></p2>
</div> <?php } ?>
<?php endwhile; ?>
<?php $searchquery = trim( get_search_query() ); if ( !empty($searchquery) ) { wp_pagenavi(); } ?>
<?php else : ?>
<h2>Nothing Found</h2>
<p>Sorry, but nothing matched your search criteria. Please try again with some different keywords.</p>
</div></div>
<?php endif; ?>