title: How to modify WooCommerce search results?
body: <p>I reckon the WooCommerce search is using a URL like <a href="http://localhost/myshoesssite/?s=noheelshoes&amp;post_type=product" rel="nofollow noreferrer">http://localhost/myshoesssite/?s=noheelshoes&amp;post_type=product</a></p>
  
  <p>Thus, I need to edit the search result so that I could add a URL parameter at the end of each product URL, like <a href="http://localhost/myshoesssite/product/no-heel-shoes?get=specs" rel="nofollow noreferrer">http://localhost/myshoesssite/product/no-heel-shoes?get=specs</a> where get=specs is the parameter. I only wish to add this parameter in my search results, NOT in my typical product URL.</p>
  
  <p>I tried using search.php in my theme but seems like when I edit the file, the search results don't change. Below is my search.php</p>
  
  <pre><code>&lt;?php
  /**
   * The template for displaying search results pages.
   *
   * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
   *
   * 
   */
  
  get_header(); ?&gt;
  
  &lt;div id="primary" class="site-content content-wrapper topofset"&gt;
      &lt;div id="main" class="container" &gt;
          &lt;div class="content content_search" &gt;
              &lt;?php
              if ( have_posts() ) : ?&gt;
  
                  &lt;header class="page-header"&gt;
                      &lt;h1 class="page-title text-light"&gt;&lt;?php printf( esc_html__( 'Search Results for: %s', 'myticket' ), '&lt;span&gt;' . get_search_query() . '&lt;/span&gt;' ); ?&gt;&lt;/h1&gt;
                  &lt;/header&gt;&lt;!-- .page-header --&gt;
  
                  &lt;?php
                  /* Start the Loop */
                  while ( have_posts() ) : the_post(); ?&gt;
  
                       &lt;span class="search-post-title"&gt;Testing&lt;?php the_title(); ?&gt;&lt;/span&gt;
              &lt;span class="search-post-excerpt"&gt;&lt;?php the_excerpt(); ?&gt;&lt;/span&gt;
              &lt;span class="search-post-link"&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_permalink(); ?&gt;&lt;/a&gt;&lt;/span&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( 'template-parts/content', 'search' );
  
                  endwhile;
  
              else :
  
                  get_template_part( 'template-parts/content', 'none' );
  
              endif; ?&gt;
          &lt;/div&gt;
      &lt;/div&gt;&lt;!-- #main --&gt;
  &lt;/div&gt;&lt;!-- #primary --&gt;
  
  &lt;?php
  get_footer();
  </code></pre>
  
  <p>How do I achieve this?</p>