title: how to add a sidebar to a woocommerce page
body: <p>I have a wordpress site and I'm using the woocommerce pluging. I have a product page and the sidebar is showing at the bottom of the page. How do I edit the code to put the sidebar so it shows the sidebar on the left of the main content area. NOT under the main content area? </p>
  
  <p>The code for the template is: </p>
  
  <pre><code>    &lt;?php
          /**
           * woocommerce_before_main_content hook
           *
           * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
           * @hooked woocommerce_breadcrumb - 20
           */
          do_action( 'woocommerce_before_main_content' );
      ?&gt;
  
          &lt;?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?&gt;
  
              &lt;h1 class="page-title"&gt;&lt;?php woocommerce_page_title(); ?&gt;&lt;/h1&gt;
  
          &lt;?php endif; ?&gt;
  
          &lt;?php do_action( 'woocommerce_archive_description' ); ?&gt;
  
          &lt;?php if ( have_posts() ) : ?&gt;
  
              &lt;?php
                  /**
                   * woocommerce_before_shop_loop hook
                   *
                   * @hooked woocommerce_result_count - 20
                   * @hooked woocommerce_catalog_ordering - 30
                   */
                  do_action( 'woocommerce_before_shop_loop' );
              ?&gt;
  
              &lt;?php woocommerce_product_loop_start(); ?&gt;
  
                  &lt;?php woocommerce_product_subcategories(); ?&gt;
  
                  &lt;?php while ( have_posts() ) : the_post(); ?&gt;
  
                      &lt;?php wc_get_template_part( 'content', 'product' ); ?&gt;
  
                  &lt;?php endwhile; // end of the loop. ?&gt;
  
              &lt;?php woocommerce_product_loop_end(); ?&gt;
  
              &lt;?php
                  /**
                   * woocommerce_after_shop_loop hook
                   *
                   * @hooked woocommerce_pagination - 10
                   */
                  do_action( 'woocommerce_after_shop_loop' );
              ?&gt;
  
          &lt;?php elseif ( ! woocommerce_product_subcategories( array( 'before' =&gt; woocommerce_product_loop_start( false ), 'after' =&gt; woocommerce_product_loop_end( false ) ) ) ) : ?&gt;
  
              &lt;?php wc_get_template( 'loop/no-products-found.php' ); ?&gt;
  
          &lt;?php endif; ?&gt;
  
      &lt;?php
          /**
           * woocommerce_after_main_content hook
           *
           * @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
           */
          do_action( 'woocommerce_after_main_content' );
      ?&gt;
  
      &lt;?php
          /**
           * woocommerce_sidebar hook
           *
           * @hooked woocommerce_get_sidebar - 10
           */
          do_action( 'woocommerce_sidebar' );
      ?&gt;
  </code></pre>