title: WordPress change search results
body: <p>I have got the problem that my WordPress theme ("Sydney") is displaying the search results wrong. Instead of just listing posts I want to display WooCommerce products only. </p>
  
  <p>Those should be ordered in a nice grid as shown in this picture:</p>
  
  <p><img src="https://i.stack.imgur.com/A3ZWt.png" alt="this picture">. </p>
  
  <p>At the moment the results are listed like this </p>
  
  <p><img src="https://i.stack.imgur.com/U4nXp.png" alt="like this">.</p>
  
  <p>How can I change the way the search results are displayed?</p>
  
  <p>At the moment my <code>search.php</code> is looking like this:</p>
  
  <pre><code>&lt;?php get_header(); ?&gt;
  
  &lt;div id="primary" class="content-area col-md-9"&gt;
      &lt;main id="main" class="post-wrap" role="main"&gt;
  
      &lt;?php if ( have_posts() ) : ?&gt;
  
          &lt;header class="page-header"&gt;
              &lt;h3&gt;&lt;?php printf( __( 'Search Results for: %s', 'sydney' ), '&lt;span&gt;' . get_search_query() . '&lt;/span&gt;' ); ?&gt;&lt;/h31&gt;
          &lt;/h3&gt;
          &lt;/header&gt;&lt;!-- .page-header --&gt;
  
          &lt;?php /* Start the Loop */ ?&gt;
          &lt;?php while ( have_posts() ) : the_post(); ?&gt;
  
              &lt;?php
              /**
               * Run the loop for the search to output the results.
               * If you want to overload this in a child theme then include a file
               * called content-search.php and that will be used instead.
               */
              get_template_part( 'content', 'search' );
              ?&gt;
  
          &lt;?php endwhile; ?&gt;
  
          &lt;?php the_posts_navigation(); ?&gt;
  
      &lt;?php else : ?&gt;
  
          &lt;?php get_template_part( 'content', 'none' ); ?&gt;
  
      &lt;?php endif; ?&gt;
  
      &lt;/main&gt;&lt;!-- #main --&gt;
  &lt;/div&gt;&lt;!-- #primary --&gt;
  </code></pre>
  
  
  
  
  <p>Thank you guys a lot! </p>
  
  <p>** <strong>UPDATE</strong>
  The solution provided by kashalo partly worked, but search results still look slightly different from the product page and are listed in only one column instead of a grid.
  <img src="https://i.stack.imgur.com/FBXTJ.png" alt="improvements by kashalo"></p>
  
  <p>** <strong>UPDATE</strong>
  The solution suggested by Alexander Wigmore looks almost the way I wanted it so look like. The only Problem with copying the <code>page.php</code>in the <code>search.php</code>is that the products are still getting displayed wheird, but not when they are displayed in the category they fit in. For example: When searching for <em>saat</em> the results are displaying the products at first with text only, but normaly under the <em>Saatgut</em> category.</p>
  
  <p><img src="https://i.stack.imgur.com/9oTsU.png" alt="Alexander Wigmore&#39;s solution"></p>