How to maintain sidebar placement in Wordpress on WooCommerce pages

admin

Administrator
Staff member
If you use a sidebar in wordpress, you can put things such as a navigation menu in them.

To place the sidebar in the right container element, you simply call
Code:
<?php get_sidebar(); ?>
within that element, and the sidebar should be placed inside that.

For example, the following code should result in a sidebar within your wordpress footer:

Code:
<footer class="footer">
  <div id="inner-footer">
    <div id="main-content-footer" class="span_16">

      <?php get_sidebar(); ?>

    </div>
  </div>
</footer>

This code will work on pages not integrated with WooCommerce, such as a front page.

On pages with WooCommerce, the code generated by
Code:
<?php get_sidebar(); ?>
will appear outside the footer in the div element #inner-content, which is within the a parent div called #content.

What files are responsible for placing the sidebar code properly in woocommerce? Is it possible that WooCommerce is generating it's own
Code:
<?php get_sidebar(); ?>
? If so, what can I do to make sure my navigation side bar is not affected by WooCommerce?

Thank you all