Title: Woocommerce bugs
Last modified: August 20, 2016

---

# Woocommerce bugs

 *  [jayce103](https://wordpress.org/support/users/jayce103/)
 * (@jayce103)
 * [14 years ago](https://wordpress.org/support/topic/woocommerce-bugs/)
 * Hi fellow WordPressers.
 * I have a couple of issues with a plugin and theme, which I am assuming is CSS.
   However I am not a programmer (I mean at all), hence why I chose WordPress.
 * OK! The first is a miss alignment of a form. I think its because the theme width
   is too narrow (but I could be wrong).
 * [http://jayceclarkephotoschool.com/checkout](http://jayceclarkephotoschool.com/checkout)
 * The second appears on the Product page
 * [http://jayceclarkephotoschool.com/shop](http://jayceclarkephotoschool.com/shop)
 * The whole sidebar and footer gets wonky.
 * Does anyone understand the problems who can help me fix it. I am looking for 
   the easiest way as I do not code.
 * Really appreciate any help as I love the theme and I love the shop plugin so 
   hoping this can be sorted…
 * Regards,
 * Jayce
 * PS the Theme is called Swagger by Outerspice…

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/woocommerce-bugs/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/woocommerce-bugs/page/2/?output_format=md)

 *  [rishel](https://wordpress.org/support/users/rishel/)
 * (@rishel)
 * [14 years ago](https://wordpress.org/support/topic/woocommerce-bugs/#post-2735165)
 * The same thing has happened on every skin that we test, EVERY skin. The opening
   page or “shop” page is completely, and totally messed up.
 * We tested it on 6 different skins, all were messed up.
 * Take a look: [http://www.patriotexplodingtargets.com/shop/](http://www.patriotexplodingtargets.com/shop/)
 *  [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [14 years ago](https://wordpress.org/support/topic/woocommerce-bugs/#post-2735170)
 * Read here: [http://www.woothemes.com/woocommerce-docs/codex/third-party-custom-theme-compatibility/](http://www.woothemes.com/woocommerce-docs/codex/third-party-custom-theme-compatibility/)
 * If you cannot fathom the hooks, use the woocommerce_content() method to integrate
   with your custom themes.
 * Its only like it is because we cannot anticipate every themes structure.
 *  [rishel](https://wordpress.org/support/users/rishel/)
 * (@rishel)
 * [14 years ago](https://wordpress.org/support/topic/woocommerce-bugs/#post-2735176)
 * Mike, I would prefer to use the hook method as it seems more stable?
 * Where do I put the code at? I assume I put all 4 lines of this code into a file
   on my site:
 *     ```
       remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
       remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
   
       add_action('woocommerce_before_main_content', create_function('', 'echo "<section id=\"main\">";'), 10);
       add_action('woocommerce_after_main_content', create_function('', 'echo "</section>";'), 10);
       ```
   
 *  [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [14 years ago](https://wordpress.org/support/topic/woocommerce-bugs/#post-2735177)
 * functions.php of your theme – you will need to tweak the <section id=\”main\”
   > part.
 * The woocommerce_content method is easier as it uses your theme sidebars too, 
   but you can try hooks first.
 *  [rishel](https://wordpress.org/support/users/rishel/)
 * (@rishel)
 * [14 years ago](https://wordpress.org/support/topic/woocommerce-bugs/#post-2735179)
 * Mike I appreciate your assistance, I really do, but I just am not getting it.
   I was trying to figure this out so that I know what to do with my other clients
   when we start to integrate them to a new ecommerce solution.
 * Try not to be upset bro, you work with this stuff day in and day out, to some
   of us… well, its new. I would love to patron your company, but this one part 
   is whats keeping me locked out, it happens man.
 * Trust me, the last thing I want to be doing is bothering you on the internet,
   and getting into the semantics of terminology about “template vs skins”, your
   far to busy for that.
 * Obviously if I could get this to work with one clients site, I could get it to
   work for all of them, so this would be a win win for me for sure.
 * I tried both methods, and well.. simply not getting it. One method simply made
   the page never stop loading with a message of No Products found etc. This is 
   new ground for me as per hooks, as I have never had a need to use them up to 
   this point, perhaps that was ignorant on my part, who knows.
 * So back to the drawing board for a solution unless some presents a much easier
   explanation that i can apply to all my clients.
 * Sad part is, every page looks awesome but the main opening page.
 * [http://www.patriotexplodingtargets.com/shop/](http://www.patriotexplodingtargets.com/shop/)
   <- Messed up
 * [http://www.patriotexplodingtargets.com/cart/](http://www.patriotexplodingtargets.com/cart/)
   <- Flawless
 *  [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [14 years ago](https://wordpress.org/support/topic/woocommerce-bugs/#post-2735180)
 * The woocommerce_content() method is what you should use.
 * Duplicate your theme’s page.php file, rename it to woocommerce.php and locate
   the loop. In twenty-10 the loop in page.php is:
 *     ```
       <?php
       			/* Run the loop to output the page.
       			 * If you want to overload this in a child theme then include a file
       			 * called loop-page.php and that will be used instead.
       			 */
       			get_template_part( 'loop', 'page' );
       			?>
       ```
   
 * Some other themes likely have a ‘have_posts’ section (the part which outputs 
   the page title/content etc).
 * [http://codex.wordpress.org/The_Loop](http://codex.wordpress.org/The_Loop)
 * Once you locate that you just need to replace it with:
 * `<?php woocommerce_content(); ?>`
 * That quite simply outputs the content area from woocommerce into your template
   with the correct layout.
 * Users who cannot do this can always use our pre-made themes. You should definitely
   look into the loop, and hooks and filters too, if your serious about developing
   for WordPress.
 *  Thread Starter [jayce103](https://wordpress.org/support/users/jayce103/)
 * (@jayce103)
 * [14 years ago](https://wordpress.org/support/topic/woocommerce-bugs/#post-2735181)
 * Hi Mike,
 * Thanks for that. Not sure if I understand it either, but will give it ago. Looking
   at the document on the link, this will solve the out of line sidebars.
 * This will not solve the form page being out of line too, or will it? I had it
   in my mind that this was a size issue rather than a hook.
 * Jayce
 *  Thread Starter [jayce103](https://wordpress.org/support/users/jayce103/)
 * (@jayce103)
 * [14 years ago](https://wordpress.org/support/topic/woocommerce-bugs/#post-2735182)
 * *Update.
 * I did the Woocommerce method and it did put my sidebar back there and brought
   my products into line. However I am still getting a syntax error as follows.
 * Warning: Invalid argument supplied for foreach() in jayceclarkephotoschool.com/
   wp-content/themes/swagger/functions/oswc-post-types.php on line 878.
 * I am still getting the checkout details out of line too.
 * Appreciate your help guys.
 * Jayce
 *  [rishel](https://wordpress.org/support/users/rishel/)
 * (@rishel)
 * [14 years ago](https://wordpress.org/support/topic/woocommerce-bugs/#post-2735183)
 * Ok, so here is what i did based upon what Mike said…
 * First I made the woocommerce.php page and put it into my themes directory, it
   was a duplicate of the page.php initially.
 * This is the loop that I think I found…
 * [http://christianrishel.info/temp/WooCommercePart1.png](http://christianrishel.info/temp/WooCommercePart1.png)
 * This is what I replaced it with…
 * [http://christianrishel.info/temp/WooCommercePart2.png](http://christianrishel.info/temp/WooCommercePart2.png)
 * I then saved the woocommerce.php file to my webserver in the themes folder, which
   produced these results:
 * [http://www.patriotexplodingtargets.com/shop/](http://www.patriotexplodingtargets.com/shop/)
 *  [rishel](https://wordpress.org/support/users/rishel/)
 * (@rishel)
 * [14 years ago](https://wordpress.org/support/topic/woocommerce-bugs/#post-2735184)
 * If anyone can take a look at my page.php file which can be renamed of course 
   to woocommerce.php and tell me where the hook goes, I would be very appreciative.
 * The link can be right clicked and saved as: [http://www.christianrishel.info/temp/page.php](http://www.christianrishel.info/temp/page.php)
 *  [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [13 years, 12 months ago](https://wordpress.org/support/topic/woocommerce-bugs/#post-2735190)
 * You cannot download the contents of a php page 😉
 * Looks like you just have not removed enough of your loop – there must be an un-
   needed endwhile in there.
 *  [rishel](https://wordpress.org/support/users/rishel/)
 * (@rishel)
 * [13 years, 12 months ago](https://wordpress.org/support/topic/woocommerce-bugs/#post-2735191)
 * And I removed it all finally, but the problem is this…
 * Take a look now: [http://www.patriotexplodingtargets.com/shop/](http://www.patriotexplodingtargets.com/shop/)
 * but
 * It’s not embedded inside a black box area like every other page is, for example:
 * [http://www.patriotexplodingtargets.com/page-1/](http://www.patriotexplodingtargets.com/page-1/)
 * [http://www.patriotexplodingtargets.com/contact/](http://www.patriotexplodingtargets.com/contact/)
 * But the shop page does not, the content is supposed to be inside a black page.
 *  [rishel](https://wordpress.org/support/users/rishel/)
 * (@rishel)
 * [13 years, 12 months ago](https://wordpress.org/support/topic/woocommerce-bugs/#post-2735192)
 * Oh and Mike, I now know how to fix this on other client sites, which means I 
   can use it on their sites. So yes, its good to fix this stuff for future clients
   for Woo right?
 *  Thread Starter [jayce103](https://wordpress.org/support/users/jayce103/)
 * (@jayce103)
 * [13 years, 12 months ago](https://wordpress.org/support/topic/woocommerce-bugs/#post-2735242)
 * Glad that you got sorted rishel!
 * Can anyone help me??? lol
 *  [anonimesone](https://wordpress.org/support/users/anonimesone/)
 * (@anonimesone)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/woocommerce-bugs/#post-2735330)
 * your sidebar is totally messed up. well i guess it is.
 * here is the fix.
 * go to your wordpress themes folder and open up ‘single.php’ or ‘page.php’ with
   your favorite editor. notepad works.
 * find out what the html code is around this line:
    `<?php get_sidebar(); ?>`
 * yep you got it. there is a div around that line.
    Similar to this maybe:
 *     ```
       <div id="sidebar">
           <?php get_sidebar(); ?>
       </div><!-- End of sidebar -->
       <div class="clear"></div>
       ```
   
 * or something else. It’s what you need.
 * ok so you now you know what is required.
    there is a file in the woocommerce 
   plugin folder called ‘sidebar.php’. The path to the file that needs to be edited
   can be found here ‘/plugins/woocommerce/templates/shop/sidebar.php’.
 * all you need to do is to add the same code that you found in the single.php or
   page.php file around the line as above.
 * to make sure that the file you are about to change does not mess up when updating
   woocommerce you need to do the following.
 * make a folder in your themes folder called ‘woocommerce’.
    in the ‘woocommerce’
   folder make another folder called ‘shop’. in the ‘shop’ folder copy the file 
   called ‘sidebar.php’ into the ‘shop’ folder. edit the copied file and save it.
   so the file should be in the path: ‘/themes/<your theme folder>/woocommerce/shop/
   sidebar.php’

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/woocommerce-bugs/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/woocommerce-bugs/page/2/?output_format=md)

The topic ‘Woocommerce bugs’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [swagger](https://wordpress.org/support/topic-tag/swagger/)

 * 19 replies
 * 6 participants
 * Last reply from: [Thomas Morley](https://wordpress.org/support/users/thomas-morley/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/woocommerce-bugs/page/2/#post-2735354)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
