I’m extremely sorry I can’t post a link to it. But I’ve attached the entire code I’m using as search.php below. I’m a newbie at coding so I can’t figure out how to align the sidebar properly. It moves down to accommodate the text when there are no results to show on the search page. I’m using the relevanssi plugin for search:
<?php
/**
* The template for displaying Search Results pages
*
* @package WordPress
*/
?>
<html>
<head>
<style type=”text/css”>
.kad-sidebar { float: right; }
</style>
</head>
<body class=”page page-id-20 page-template-default”>
<?php if ( have_posts() ) : ?>
<header class=”page-header”>
<h1 class=”page-title” style=”margin-left: 20px; margin-top: -10px; padding-top: -10px;”><?php printf( __( ‘Search Results for: %s’, ‘Virtue’ ), get_search_query() ); ?></h1>
<h6 style=”margin-left: 20px; margin-bottom: -6px; padding-bottom: -6px;”><?php echo ‘Search found ‘ . $wp_query->found_posts . ‘ results’; ?><?php if (function_exists(‘relevanssi_didyoumean’)) { relevanssi_didyoumean(get_search_query(), “. Were you searching for: “, “?”, 5); }?></h6>
</header><!– .page-header –>
<ul id=”post-list”>
<?php while (have_posts()) : the_post(); ?>
<div class=”sresults” style=”margin-bottom: 20px; display: inline;”>
<div class=”thumbs” style=”float: left; width: 100px; height: 100px; margin: 0 10px 10px 0; “>” title=”<?php the_title(); ?>”><?php echo relevanssi_highlight_terms(get_the_title(), get_search_query()) . get_the_post_thumbnail( $post_id, array(100,100), none ); ?></div>
</div>
<?php endwhile; ?>
<?php else : ?>
<header class=”page-header”>
<h1 class=”page-title” style=”margin-left: 20px; margin-top: -10px; padding-top: -10px;”>
<?php _e( ‘Nothing Found’, ‘nothing’ ); ?>
</h1>
<h6 style=”margin-left: 20px; margin-bottom: -14px; padding-bottom: -14px;”>
<?php if (function_exists(‘relevanssi_didyoumean’)) { relevanssi_didyoumean(get_search_query(), “<p>Did you mean: “, “?</p>”, 5); }?>
</h6>
</header>
<span style=”margin-left: 20px;”>Sorry, nothing matched your search criteria. We have in store what you have in mind! Please try again with some different keywords.</span>
<?php endif; ?>
</body>
</html>